Computer Systems - Tutorial 1.

1. Convert the following binary numbers to decimal, hex and octal:-

(a) 1010 (b) 1010110 (c) 10011101 (d) 101111001

2. Convert the following decimal numbers to binary, and then to hex and octal:-

(a) 16 (b) 23 (c) 167 (d) 100

3. Perform the following binary addition using 8-bit binary 2’s complement:- 127+12. Which 8-bit 2’s complement number is the answer? What has happened here, and how do you think a computer system would deal with this?

4. Using 2’s complement binary arithmetic with a 12-bit word, write down the range of numbers capable of being represented (both in decimal and in binary) by giving the smallest and largest numbers. What happens when the smallest number is decremented and the largest number is incremented?

5. (a) Write down the largest positive decimal integer in n digits.

(b) Write down the largest positive binary integer in m digits.

(c) It is necessary to represent n-digit decimal numbers as binary. What is the minimum number, m, of bits needed to represent all possible n-digit decimal numbers? The largest m-bit binary number should be greater than or equal to the largest n-digit decimal number.

6. Perform the following additions on 4-bit binary numbers:-

(a) 0011+1100 (b) 1111+0001 (c) 0110+0111 (d) 1100+1010

In each case, regard the numbers as being (i) unsigned integer and (ii) 2’s complement integer. Comment on your results where necessary.

 

Back to Index page