Digital concept an Number system Chapter 1 Binary Codes Shall I compare thee to a summer' s day?
Digital concept and Number system Chapter 1 Binary Codes Shall I compare thee to a summer’s day?
Natural Binary Coded Decimal (BCD) Decimal BCD group of four binary digits represent oooo a single decimal digit 0001 0123456789 0010 0011 0100 0101 0110 0111 1000 1001
group of four binary digits represent 0 a single decimal digit 1 2 3 4 5 6 7 8 9 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 Decimal BCD Natural Binary Coded Decimal (BCD)
Weighted Binary Coded Decimal Decimal 8421 2421 EX-3 0000 0000 0011 Assign fixed 00010001 0100 weight for 0123456789 0010 0010 0101 0011 0011 0110 each bit 0100 0100 0111 position 0101 1011 1000 0110 1100 1001 0111 1101 1010 1000 1110 1011 1001 1111 1100
0 1 2 3 4 5 6 7 8 9 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 Decimal 8421 2421 Ex-3 0000 0001 0010 0011 0100 1011 1100 1101 1110 1111 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 Assign fixed weight for each bit position Weighted Binary Coded Decimal
BCD Self-complementing codes Logic complements A logic complement of a binary digit is its opposiTe value. The logic complement of 0 is 1 and the logic complement of 1 is O Ex logic complement of (o011)2 is 1100
• Logic complements – A logic complement of a binary digit is its opposite value. – The logic complement of 0 is 1 and the logic complement of 1 is 0. Ex. logic complement of (0011)2 is 1100. BCD Self-complementing codes
*b is the radix of the numeral x Two arithmetic complements Radix complement of x is written x X=(6b)-X diminish radix complement of x is written x-1 X.1=(b-1)-X 10s complement (radix complement) of 610 10-6=4 9s complement(Diminish radix complement )of 6 10-1-6=310
*b is the radix of the numeral x • Two arithmetic complements – Radix complement of x is written x’ – X’ = (b) – X – diminish radix complement of x is written x-1’ – X-1 ’ = (b - 1) – X • 10s complement (radix complement) of 610 • 10-6=410 • 9s complement ( Diminish radix complement ) of 610 •10-1-6=310