Tutorial 1
Tutorial 1
EXERCISE 2:
1. Write the following decimal numbers in eight bits two’s complement, do the
addition/subtraction, convert your answer back to decimal.
i. (-3) + (+ 11)
ii. (+125) + (- 40)
Page 1 of 3
COMPUTER ARCHITECTURE
iii. (+5) + (- 7)
iv. (-23) – (- 18)
v. For n bit two’s complement what is the range of numbers you can represent?
2. Write the following fractions in binary. Use one sign bit and four bits after the binary
point.
5
i. 8
5
ii. −8
3. Convert the following binary fractions to ordinary fractions.
i. 0.1000
ii. 1.0001
iii. 0.1111
iv. 1.1111
v. What fractions can be represented as binary fractions with one sign bit and four
bits after the binary point?
EXERCISE 3:
1. Using 5 bits for the mantissa and 5 bits for the exponent, write the
following numbers in twos complement binary.
5
i. 16
1
ii. 1014
1
iii. 1024
3
iv. − 512
2. Form the two’s complement of each of the following binary numbers.
i. (111011101110)2
ii. (11111111000100)2
iii. (100000000)2
iv. (1010101010111)2
Page 2 of 3
COMPUTER ARCHITECTURE
EXERCISE 5:
1. Calculate the binary numbers
(a) 111x10 (e) 1100x100
(b) 101x1000 (f) 11101x1000
(c) 11000x10 (g) 10100x1000
(d) 10100/10 (h) 1100/100
Check your answers by converting to base 10 numbers.
2. Solve the following equations, where all numbers, including x, are binary:
𝑥 𝑥
(a) 11 = 110 (c) 101 = 101
𝑥 𝑥
(b) = 111 (d) 111 = 1011
10
3. Multiply each of the following binary numbers by itself:
(a) 11 (b) 111 (c) 1111
What do you notice about your answers to parts (a), (b) and (c)?
What will you get if you multiply 11111 by itself?
4. Multiply each of the following binary numbers by itself:
(a) 101 (b) 1001 (c) 10001 (d) 100001
What will you expect to get if you multiply 1000001 by itself?
5. Calculate the binary numbers:
(a) 101(110 + 1101) (b) 1101(1111 – 110)
(b) 111(1000 – 101) (d) 1011(10001 – 1010)
Page 3 of 3