0% found this document useful (0 votes)
11 views2 pages

Data Types Homework 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Data Types Homework 3

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Homework 3 Binary arithmetic

Data representation

Homework 3 Binary arithmetic

1. Computers store data as bytes.

a) How many bits make up a byte? [1]

b) Add the following unsigned 8-bit binary integers: Show your working. [2]

1
0 1 1 1 1 1 0 0
1 0 0 1 1 0 1 1
1 1 1 1 0 1 1 1

c) Explain the problem that has resulted from the calculation above using 8 bits. [1]

overflow

2. Calculate the largest integer value that can be stored in three combined unsigned binary
bytes: Show your working. [2]

3 x 8 = 24

3. Show how the numbers 3 and -9 would be represented in one byte using sign and
magnitude. [1]

00000011
00001001/ 11110110

Why is this method of representing negative numbers not commonly used in


computer processors?
Because it creates two zeros and it is hard to process [2]

1
Homework 3 Binary arithmetic
Data representation

4. Two’s complement can be used to perform subtraction. Calculate 12410 – 10110


using 8-bit two’s complement binary (marks awarded for showing working out): [4]

0 1 1 1 1 1 0 0
0 1 1 0 0 1 0 1
0 0 0 1 1 0 1 1

5. Using one byte to hold each number, with an imaginary binary point after the fourth digit,
convert the following decimal numbers into binary: [3]

a) (i) 4.75 = 0100.1100

(ii) 3.1875 = 0011.0011

(iii) 11.6875 = 1011.1011

b) Convert the following binary numbers to decimal, assuming three bits after the
binary point: [2]

(i) 1000.1011 = 8.6875

(ii) 0010.1101 =2.8125

c) What are the largest and smallest positive numbers that can be stored in one byte
assuming three bits after the point? [2]

[Total 20 marks]

You might also like