Chapter 3 Part I Data Representation
Chapter 3 Part I Data Representation
- The weight of the nth digit of the number from the left of the decimal point is equal
to:
nth digit * 10n-1
- The weight of the nth digit of the number from the right of the decimal point is
equal to:
nth digit * 10-n
➢The right most position is the units (20) position, the second is the
2`s(21) position, & proceeding in this way we have 4`s(22) position,
8`s(23) position, 16`s (24) position, & so on.
Decimal Octal
Binary Hexadecimal
7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
46810
7058 = 1110001012
1 1
10101 21
+ 11001 + 25
101110 46
• Definition:
• For a number which has n digits a complement of the number is the difference
between the number and the base raised to the nth power minus one.
• In subtracting binary number using complement method the following steps are
useful.
• Steps:
• 2. add the complement to the number from which you are taking away
(minuend)
• 3. if there is a carry of one add it to obtain the result; if there is no carry, re-
complement the sum and attach a negative sign to obtain the result.
April 18, 2024 unity University 41
Additive Method of Subtraction
• Example:
Exercise
1 adds the binary numbers 1011 and 101 in both binary and decimal form.
a) 49510 b) 2910
c) 48 d) c16
a) 10 b) 101
c) 101101 d) 011011
1110
x 1011
1110
1110
0000
1110
10011010
In all cases, binary coding schemes separate the characters, known as character
set, in to zones. Zone groups characters together. With in each zone, the individual
characters are identified by digit code.
April 18, 2024 unity University 44
4-Bit Binary Coded Decimal (BCD)
Systems
• The 4-bit BCD system is usually employed by the computer systems to represent
and process numerical data only.
✓To represent 10 decimal digits(0000:0 ….1001: 9), at least need 4 bits.
• (Each decimal number ((base 10 i.e 0,1,2…9)) Represent by a 4 bit Binary binary
(0,1) number )
• In the 4-bit BCD system, each digit of the decimal number is Represented to
its corresponding 4-bit binary sequence.
• Solution:
• (4)10=0100 in BCD
• 210=0010 in BCD
• 4210=0100 0010
• Hence BCD code is extended from 6-bit code to 8-bit code called EBCDIC.
• ASCII-7 is a 7-bit code that allows 128(27) different characters. The first
three bits are used as zone bit and the rest 4 bits indicate the digit.
✓UNICODE
✓Exceed three