0% found this document useful (0 votes)
34 views5 pages

Representing Integer Data: BCD: Binary-Coded Decimal

This document discusses different ways of representing integer data in binary formats. It covers binary-coded decimal, which uses 4 bits per decimal digit, and sign-and-magnitude representation. It also explains nine's complement and one's, two's, and ten's complement representations, which handle negative numbers by inverting and adding 1 to the binary digits. Examples are provided of adding numbers and handling overflow in each representation method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

Representing Integer Data: BCD: Binary-Coded Decimal

This document discusses different ways of representing integer data in binary formats. It covers binary-coded decimal, which uses 4 bits per decimal digit, and sign-and-magnitude representation. It also explains nine's complement and one's, two's, and ten's complement representations, which handle negative numbers by inverting and adding 1 to the binary digits. Examples are provided of adding numbers and handling overflow in each representation method.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

UNSIGNED BINARY AND

BINARY-CODED DECIMAL
REPRESENTING INTEGER
DATA

BCD: binary-coded decimal


Each decimal digit individually converted
to binary
Requires 4 bits per digit
8-bit location hold 2 BCD digits 00 to 99
6810 01101000BCD

Hexa: 4 bits can hold 16 values, 0 to F


A to F not used in BCD

SIGN-AND-MAGNITUDE
REPRESENTATION

Nines Decimal Representation

Examples 9s complement
9s compl. Repr. For:
3-digit nb 467?
999
467
532
4-digit nb 467?
9999
467
9532

Sign-and-magnitude value 9990?

9999
9990
9
9990 represents the value 9

Figure 4.6 Addition as a counting process

Figure 4.7 Addition with wraparound

Ones complement

Figure 4.8 Addition with modulus crossing

Add in 1s complement

Overflow

Tens complement scale

Overflow sign of result sign both operands

Examples

Twos complement

10s complement of
247 is 1000 247 = 753
17 is 1000 017 = 983

Sign and magnitude of 777


Begins with a 7 ( 5) negative
1000 777 = 223
The sign-magnitude value is 223

Alternative 10s comp = 9s comp + 1

2s complement = 1s complement+1

Examples of 2s complement

You might also like