Digital Codes
Each digit of a decimal number is represented by binary equivalent.
In 4-bit binary formats:
Total number of possible representation = 24 = 16 , Valid BCD codes = 10 and invalid BCD codes = 6.
In 8 - bit binary formats :
Valid BCD codes = 100 , Invalid BCD codes = 256-100 = 156.
BCD is also called 8421 code.
Excess-3 Code
It is a 4-bit code.
It can be derived from BCD code by adding "3" to each coded number and "Self-complementing code".
It is the only code which is unweighted and self complementing. 2421 , 3321 , 4311 and 5211 all are self complementing codes where sum of weight is 9.
Gray Code
Also called "minimum change codes" in which only one bit in the code group changes when going from one step to the next.
Gray code is also called cyclic or reflective code.Since error is minimum so also called minimum error code.
Binary-to-Gray Conversion
"MSB" in the gray code is same as corresponding digit in binary number.
Starting from"Left to Right", EXOR each adjacent pair of binary digits to get next gray code digit.
Gray-to-Binary Conversion
"MSB" of Binary is same as that of gray code.
If a number system has base b then we can find its b's complement and (b-1)'s complement.
To determine (b-1)'s complement subtract given number form maximum number possible to given base i.e ( rn - 1).
To determine b's complement , first determine (b-1)'s complement then add 1 to get b's complement of number.
To convert decimal number into any other base b divide integer part with b and multiply fractional part with b.
In 4-bit binary formats:
Total number of possible representation = 24 = 16 , Valid BCD codes = 10 and invalid BCD codes = 6.
In 8 - bit binary formats :
Valid BCD codes = 100 , Invalid BCD codes = 256-100 = 156.
BCD is also called 8421 code.
Excess-3 Code
It is a 4-bit code.
It can be derived from BCD code by adding "3" to each coded number and "Self-complementing code".
It is the only code which is unweighted and self complementing. 2421 , 3321 , 4311 and 5211 all are self complementing codes where sum of weight is 9.
Gray Code
Also called "minimum change codes" in which only one bit in the code group changes when going from one step to the next.
Gray code is also called cyclic or reflective code.Since error is minimum so also called minimum error code.
Binary-to-Gray Conversion
"MSB" in the gray code is same as corresponding digit in binary number.
Starting from"Left to Right", EXOR each adjacent pair of binary digits to get next gray code digit.
Gray-to-Binary Conversion
"MSB" of Binary is same as that of gray code.
If a number system has base b then we can find its b's complement and (b-1)'s complement.
To determine (b-1)'s complement subtract given number form maximum number possible to given base i.e ( rn - 1).
To determine b's complement , first determine (b-1)'s complement then add 1 to get b's complement of number.
To convert decimal number into any other base b divide integer part with b and multiply fractional part with b.
If ( X3 X2 X1 X0)b
= (A)10 then A = X0 + X1b1
+ X2b2 + X3b3
No comments