In: Computer Science
For the first three sections assume unsigned integers.
Convert to binary
Steps
Number 85
divide by 2 |
|||
result |
42 |
remainder |
1(LSB) |
divide by 2 |
|||
result |
21 |
remainder |
0 |
divide by 2 |
|||
result |
10 |
remainder |
1 |
divide by 2 |
|||
result |
5 |
remainder |
0 |
divide by 2 |
|||
result |
2 |
remainder |
1 |
divide by 2 |
|||
result |
1 |
remainder |
0 |
divide by 2 |
|||
result |
0 |
remainder |
1(MSB) |
b. 4563-1000111010011
Steps
Number 4563
divide by 2 |
|||
result |
2281 |
remainder |
1(LSB) |
divide by 2 |
|||
result |
1140 |
remainder |
1 |
divide by 2 |
|||
result |
570 |
remainder |
0 |
divide by 2 |
|||
result |
285 |
remainder |
0 |
divide by 2 |
|||
result |
142 |
remainder |
1 |
divide by 2 |
|||
result |
71 |
remainder |
0 |
divide by 2 |
|||
result |
35 |
remainder |
1 |
divide by 2 |
|||
result |
17 |
remainder |
1 |
divide by 2 |
|||
result |
8 |
remainder |
1 |
divide by 2 |
|||
result |
4 |
remainder |
0 |
divide by 2 |
|||
result |
2 |
remainder |
0 |
divide by 2 |
|||
result |
1 |
remainder |
0 |
divide by 2 |
|||
result |
0 |
remainder |
1 (MSB) |
Convert to hexadecimal
a. 8510=5516
Convert 8510 to hex:
Division |
Quotient |
Remainder |
Remainder |
Digit # |
---|---|---|---|---|
85/16 |
5 |
5 |
5 |
0 |
5/16 |
0 |
5 |
5 |
1 |
b. 456310=11D316
Convert 456310 to hex:
Division |
Quotient |
Remainder |
Remainder |
Digit # |
---|---|---|---|---|
4563/16 |
285 |
3 |
3 |
0 |
285/16 |
17 |
13 |
D |
1 |
17/16 |
1 |
1 |
1 |
2 |
1/16 |
0 |
1 |
1 |
3 |
Convert from binary to decimal
a. 1010 1011=171
1010 1011=(1 × 2⁷) + (0 × 2⁶) + (1 × 2⁵) + (0 × 2⁴) + (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 171
b.0011 0001=49
00110001 = (0 × 2⁷) + (0 × 2⁶) + (1 × 2⁵) + (1 × 2⁴) + (0 × 2³) + (0 × 2²) + (0 × 2¹) + (1 × 2⁰) = 49
Convert from binary to hexadecimal
a. 1010 1011=AB
b.0011 0001=31