Binary Codes
Binary Codes
By,
Ms.T.Kalaiselvi, AP(SLG-I) / CSE
Binary Code
A binary code is just an assignment of
information to bit patterns.
Binary Codes
• Electronic digital systems use signals that have two
distinct values and circuit elements that have two
stable states.
• Digital systems represent and manipulate not only
binary numbers, but also many other discrete
elements of information.
• Any discrete element of information distinct among a
group of quantities can be represented by a binary
code.
• Binary codes merely change the symbols, not the
meaning of the elements of information that they
represent.
Binary Codes
0101 0111
59 in BCD (0 ~ 99)
because there are unused code words
87 in normal unsigned binary number (0 ~ 255)
Binary-Coded Decimal (BCD)
0010 = 2
9s’complement of 2 can be obtained by complementing
individual bits
1101 = (2+4+0+1) = 7
Excess-3 code
16
for a 4-bit decimal code, there are different ways to
10
choose 10 out of 16 4-bit code words, and 10!
ways to assign each different choice to the 10
digits. So there are
(16!/(10!*(16-10)!))*10! Or 29059430400
different 4-bit decimal codes.
Gray Code