View Single Post
Old 2005-09-16, 22:19   #7
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

64110 Posts
Default

Quote:
Originally Posted by RMAC9.5
Cheesehead's answer is partly correct but incomplete (as he left out the last 6 "digits"). IBM's hexadecimal BCD code has 16 characters, 0 - 9 and A - F.
Here are the missing characters:
A (decimal) = 1010 (BCD)
B (decimal) = 1011 (BCD)
C (decimal) = 1100 (BCD)
D (decimal) = 1101 (BCD)
E (decimal) = 1110 (BCD)
F (decimal) = 1111 (BCD)

Consequently, 1011 0011 1100 0100 = B 3 C 4 and is considered by IBM mainframe programmers as a 4 digit hexadecimal number which can be added, subtracted, multiplied, etc. like any other number. This is where, I think, the expression "A + 1 = B" came from (e.g. 1010 + 0001 = 1011 or A+1 = B).
Not disputing what you say, but why would there be binary coded decimal to encode hexadecimal?
Orgasmic Troll is offline   Reply With Quote