Data Storage. SIGN AND MAGNITUDE Storing and representing numbers

Preview:

Citation preview

Data Storage

SIGN AND MAGNITUDE

Storing and representing numbers

Give the sign and magnitude of -30

Give the sign and magnitude of the following integers

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

TWO’S COMPLEMENT REPRESENTATION

Represent -50 in two’s complement

Represent -38 in two’s complement

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

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

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

BINARY CODED DECIMAL(BCD)

Storing and representing digits and characters

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.

BCD Representations

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

Represent the digits 4901 in BCD form

Give the BCD representations of the following numbers:

91430256-81297

Covert BCD representation 010101111001 to decimal

Covert BCD representation 100000000101 to decimal

Covert the following BCD values into decimal

0010100100110000011101011001011110000000

Exam extract

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.

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.

Exercise 1

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

Exercise 2

Home Work

Recommended