HTM 304 -- Binary Exercises

advertisement
HTM 304 -- Binary Exercises
NAME______________
Set 1. Logic Operations: AND, OR, NOT.
1. not (1 or 0) =
2. not ( 0 or (1 and 0) ) =
3. (1 and 0) or (0 or 1) =
4. 1 or ( 0 and (not 1) ) =
Set 2. Count binaries: Write down the corresponding binary numbers.
Decimal
Binary
Decimal
Binary
Decimal
Binary
Decimal
0
0
4
8
12
1
1
5
9
13
2
6
10
14
3
7
11
15
Binary
Set 3. Binary to Decimal Conversion
1. 10001012 =
2. 11111012 =
3. 100110012 =
4. 1100112 =
5. 1111112 =
Set 4. Convert the following decimal numbers to binaries
1. 127
2. 96
3. 37
4. 256
Set 5. Binary Addition
1. 10100111 + 00110011 =
2. 01010101 + 00111100 =
3. 11110001 + 01001111 =
Set 6. Your friend emails you his password. For security concern, he encrypted the
content and send you two separate emails.
A) in the first email, you received a message “HELLO, Victor!”
B) in the second email, he sends you the instruction to decipher the code:
a. Take the underlined letters
b. Convert each letter into binary code using ASCII table
c. Find the 1st and 3rd bits for each byte (counting from right to left). Reverse
them (NOT operation)
d. Convert the new bytes into letters.
Write down your deciphered code.
Download