Consider A10 is the last two digits of your AUT ID number.
# | # | # | # | # | # | 9 | 2 |
---|
A10 = 92
1. Convert A10 (from Decimal) to Binary - call the answer M2
92 | / | 2 | = | 46 | r | 0 |
46 | / | 2 | = | 23 | r | 0 |
23 | / | 2 | = | 11 | r | 1 |
11 | / | 2 | = | 5 | r | 1 |
5 | / | 2 | = | 2 | r | 1 |
2 | / | 2 | = | 1 | r | 0 |
1 | / | 2 | = | 0 | r | 1 |
2. Convert A10 (from Decimal) to Hexadecimal - call the answer N16
92 | / | 16 | = | 5 | r | 12 |
5 | / | 16 | = | 0 | r | 5 |
Carry out the operations, assume that the numbers are unsigned and unlimited bits to represent:
a. Base 2: M2 + 110011012
1 | 1 | 1 | |||||||
0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | + | |
1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | = | |
1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 |
b. Base 16: N16 + 9916
1 | ||||||||
0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | + |
1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | = |
1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 |
Assume that numbers are represented as signed, 8-bit, 2's complement representations.
B10 = -A10
B10 = -92
Convert B10 to 8-bit 2's complement Binary; give the answer in 8-bit binary number form
0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | ||||
inverse | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | + | 1 | = |
2's compl. | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
Assume that you have the number C2 found in Question 3, represented as a signed, 8-bit, 2's complement representation. Carry out the following operations:
a. C2 | 01110001 (OR)
1 | 1 | 1 | 1 | 1 | 1 | |||
1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | | (OR) |
0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | = |
1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 |
b. C2 & 01110001 (AND)
1 | ||||||||
1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | & (AND) |
0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | = |
0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
c. C2 ^ 1101 1100 (XOR)
1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | ^ (XOR) |
1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | = |
0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
d. C2 << 4 (SHIFT LEFT ARITHMETIC)
1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | |
0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | << 1 |
1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | << 2 |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | << 3 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | << 4 |
The ASCII Character Set - 7-bit
00 | NUL | 01 | SOH | 02 | STX | 03 | ETX |
---|---|---|---|---|---|---|---|
04 | EOT | 05 | ENQ | 06 | ACK | 07 | BEL (\a) |
08 | BS (\b) | 09 | HT (\t) | 0A | LF (\n) | 0B | VT (\v) |
0C | FF (\f) | 0D | CR (\r) | 0E | SO | 0F | SI |
10 | DLE | 11 | DC1 | 12 | DC2 | 13 | DC3 |
14 | DC4 | 15 | NAK | 16 | SYN | 17 | ETB |
18 | CAN | 19 | EM | 1A | SUB | 1B | ESC |
1C | FS | 1D | GS | 1E | RS | 1F | US |
20 | SPACE | 21 | ! | 22 | " | 23 | # |
24 | $ | 25 | % | 26 | & | 27 | ' |
28 | ( | 29 | ) | 2A | * | 2B | + |
2C | , | 2D | - | 2E | . | 2F | / |
30 | 0 | 31 | 1 | 32 | 2 | 33 | 3 |
34 | 4 | 35 | 5 | 36 | 6 | 37 | 7 |
38 | 8 | 39 | 9 | 3A | : | 3B | ; |
3C | < | 3D | = | 3E | > | 3F | ? |
40 | @ | 41 | A | 42 | B | 43 | C |
44 | D | 45 | E | 46 | F | 47 | G |
48 | H | 49 | I | 4A | J | 4B | K |
4C | L | 4D | M | 4E | N | 4F | O |
50 | P | 51 | Q | 52 | R | 53 | S |
54 | T | 55 | U | 56 | V | 57 | W |
58 | X | 59 | Y | 5A | Z | 5B | [ |
5C | \ | 5D | ] | 5E | ^ | 5F | _ |
60 | ` | 61 | a | 62 | b | 63 | c |
64 | d | 65 | e | 66 | f | 67 | g |
68 | h | 69 | i | 6A | j | 6B | k |
6C | l | 6D | m | 6E | n | 6F | o |
70 | p | 71 | q | 72 | r | 73 | s |
74 | t | 75 | u | 76 | v | 77 | w |
78 | x | 79 | y | 7A | z | 7B | { |
7C | | | 7D | } | 7E | ~ | 7F | DEL |
Use the ASCII table; find the hexadecimal and Binary values corresponding to your full name (note that there are spaces in the string); answer the following:
a. Your full name in Hexadecimal16
b. How many bits are used (do not count the end of the string byte)
ASCII | Hexadecimal | Binary |
---|---|---|
J | 4A | 0100 1010 |
a | 61 | 0110 0001 |
c | 63 | 0110 0011 |
k | 6B | 0110 1011 |
20 | 0010 0000 | |
D | 44 | 0100 0100 |
a | 61 | 0110 0001 |
r | 72 | 0111 0010 |
l | 6C | 0110 1100 |
i | 69 | 0110 1001 |
n | 6E | 0110 1110 |
g | 67 | 0110 0111 |
t | 74 | 0111 0100 |
o | 6F | 0110 1111 |
n | 6E | 0110 1110 |