CS208 Introduction to Computer Systems Monday, 22 May 2023 + Questions about bytes - How many bits are in a byte? 8 - How many different bit patterns could a byte store? 00000000...11111111 : 2^8 = 256 - How many hexadecimal digits are required to specify the value of a byte? 2 - Suppose you enter "ABCD" in a file something.txt and save it. - What Unix command can you use to see the contents of this file as text? cat something.txt - What Unix command can you use to see the contents of this file as individual bytes expressed in hexadecimal? hexdump -C something.txt - What output does that second command produce? (are you seeing something like 41 42 43 44 0a?) yes - Now enter "41 42 43 44 0a" in something.txt - Use that second Unix command above to look at the new contents of something.txt - cat something.txt | hex2raw > something-else.txt - What happened? + ...