Professional Documents
Culture Documents
Computer Architecture
2. Using the signed magnitude notation find the 8-bit binary representation
of the decimal value 2410 and -2410.
We have 24 = 23 + 24
2410 8-bit representation: 2410 = 00011000, -2410=10011000
We have 63 = 1 + 2 + 4 + 16 + 8 + 32
6310 8-bit binary 63 = 00111111, -63 = 10111111
4. Fill in the empty slots in the table by converting numbers into different
representations. All numbers are 8 bits in length. Use 2’s compliment
representation in binary and hexadecimal numbers.
Binary Hexadecimal Unsigned Signed Decimal
Decimal
0010 0001 33
6F
1010 0100
-25
Binary to hexadecimal:
- "0"–"9" to represent values 0 to
- "A"–"F" to represent values 10 to 15.
- The left-most bit represents the sign of the integer.
- 0 for positive numbers.
- 1 for negative numbers.
We have the result
Binary Hexadecimal Unsigned Signed Decimal
Decimal
0010 0001 21 33 33
0110 1111 6F 111 111
1010 0100 A4 164 -92
1110 0111 E7 231 -25
5. Find 10011001 is an 8-bit binary sequence.
Find the decimal value it represents if it was in unsigned and signed
magnitude.
- Signed: -25 = 23 + 24 + 1
- Unsigned: 153 = 23 + 24 + 1 + 27
c. Excess notation?
1000 1011 – (27) = 20 + 21 + 23 + 27 - 27 = 11
d. Two’s complements?
1000 1011 = 20 + 21 + 23 + (-27) = -117
Assume your answer must also use only eight bits and are in two’s
complement notation. Do all the above operations still work correctly? If
not, which ones have problems, and why?
11 Decimal
1100 0011 -61
+0010 0011 35
1110 0110 -26 OK
11 Decimal
0100 0011 67
+0010 0011 35
0110 0110 102 OK
1 Decimal
1100 0011 -61
-0010 0011 35
1010 0000 -96 OK
Note:
In Addition check the left bit
(0)a + (0)b -> (0)c -> OK
(0)a + (0)b -> (1)c -> Not OK
(1)a + (1)b -> (1)c -> OK
(1)a + (1)b -> (0)c -> Not OK
(0)a + (1)b -> (x)c -> Always OK
Similar with Subtraction
10.Consider the 8-bit binary bit pattern 10101010. What is its decimal (base
ten) value if the bit pattern is A two’s complement integer?
128.125 = 10000000.001
12.
a. Convert 101.101 from unsigned fixed point representation to
decimal.
5.625
b. Convert 72.375 from decimal to unsigned fixed point binary
100 0.010(1001)
13.
a. Represent +0.8 in the following floating-point representation:
1-bit sign
4-bit exponent
6-bit normalised mantissa (significand).
Hex: 3EA00000
Binary: 0011 1110 1010 0000 0000 0000 0000 0000
IEEE 745:
Sign (1bit): 0 -> positive
Exponent (8bit): 0111 1101 -> 125 – 127 (bias) = -2
Mantissa (23bit): 010 0000 0000 0000 0000 0000 -> 1.01 (binary) = 2^1
+ 2^(-2) = 1.25 (decimal)
+1 2-1 1.0
0.5 = 00111111000000000000000000000000
0.3125
+1 2-2 1.25
0.3125 = 00111110101000000000000000000000
0.5 + 0.3125 = 00111111010100000000000000000000 = 0.8125
b. 12 – 3.875.
12
+1 23 1.5
12 = 01000001010000000000000000000000
3.875
+1 21 1.9375
3.875 = 01000000011110000000000000000000
12 - 3.875 = 01000001000000100000000000000000 = 8.125
18.Assume a color display using 8 bits for each of the primary colors (red,
green, blue) per pixel and a frame size of 1280 × 1024.
a. What is the minimum size in bytes of the frame buffer to store a
frame?
Answer: 1*3*1280*1024 = 3932160 bytes
b. How long would it take, at a minimum, for the frame to be sent
over a 100 Mbit/s network?
8 6
Answer: 3932160 × 100 ×10 =0.3145728( s)
19.Given the two 16-bit numbers expressed in hexadecimal representation:
xABCD and xFEED, evaluate the following expression. Give your
answer in hexadecimal(base16). xABCD AND (NOT(xFEED)