26
Data Storage

Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Embed Size (px)

Citation preview

Page 1: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Data Storage

Page 2: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

SIGN AND MAGNITUDE

Storing and representing numbers

Page 3: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Give the sign and magnitude of -30

Page 4: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Give the sign and magnitude of the following integers

+ 60 and -60+90 and -90+29 and -29

Page 5: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

TWO’S COMPLEMENT REPRESENTATION

Page 6: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Represent -50 in two’s complement

Page 7: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Represent -38 in two’s complement

Page 8: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Perform the calculation 75 – 30, using two’s complement method.

Page 9: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Perform the calculation 90 – 30, using two’s complement method.

Page 10: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Perform the calculation 52– 27, using two’s complement method.

Page 11: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

BINARY CODED DECIMAL(BCD)

Storing and representing digits and characters

Page 12: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Binary coded decimal (BCD) is a system of writing numerals that assigns a four-digit binary code to each digit 0 through 9 in a decimal (base-10) numeral. 

Computer use the number system you have been studying in order to carry out calculations. Once a calculation is completed, the result has to be displayed in the decimal format on the screen, for example on electronic scoreboard, calculators, microwave ovens and digital clock.

Page 13: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

BCD Representations

0000 – 00001 – 1 0010 – 2 0011 – 3 0100 – 4 0101 – 5 0110 – 6 0111 – 7 1000 – 8 1001 – 91101 – (-) negative sign1011 – (-)

Page 14: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Represent the digits 4901 in BCD form

Page 15: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Give the BCD representations of the following numbers:

91430256-81297

Page 16: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Covert BCD representation 010101111001 to decimal

Page 17: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Covert BCD representation 100000000101 to decimal

Page 18: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Covert the following BCD values into decimal

0010100100110000011101011001011110000000

Page 19: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Exam extract

Page 20: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

ASCII

ASCII (American Standard Code for Information Interchange) is a character-encoding scheme. Originally based on the English alphabet, it encodes 128 specified characters into 7-bit binary integers.

Page 21: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers
Page 22: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Example

In a computer system using the seven bit ASCII representation, the letter J would be represented by 1001010 or 74, Give the ASCII representation of letters E and P.

Page 23: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers
Page 24: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Exercise 1

The ASCII representation of letter P has a decimal value of 80. What is the ASCII representation of letter S?

Page 25: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Exercise 2

Page 26: Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Home Work