16th August
16th August
16th August
• Recall that each denary digit was taken as a group of 4 bits to form a BCD value. So the following
conversion is impossible: 11001010BCD
• This is because when grouped into 4s each pattern exceeds the denary value 9. So it is an invalid
BCD value. However, this is a valid binary value that can be converted into Hexadecimal or
Denary.
• Despite its convenience and ease of use, BCD takes up more space than a value converted into
binary.
Character representation
• A character is a letter, digit or symbol that is represented in a computer.
• By default a computer system can represent a specific set of characters. This is known as a
character set.
• In the earlier days different manufacturers had their own standards. Consider the following
example.
Parallel port
Serial port
• The Commodore computer (European) had a character set that was not fully compatible with the
EPSON printer.
• To resolve this problem, the user had to connect the printer to the computer using a hardware
interface.
• This interface provided 2 uses:
◦ A physical connection that connects the computer through the serial port to the printer using a
parallel port.
◦ It converts the Commodore’s character to an equivalent EPSON code so that the correct
character is printed.
• Thus there was an increased cost for users to work with various devices.
• As a result, computer hardware and software manufacturers started to set some standards so that
there would be greater compatibility.
• From amongst these standards is:
◦ ASCII
◦ Unicode
ESC 27
SPACE 32
0 48
1 49
ENTER 13
A 65 01000001
B 66 01000010
C 67 01000011
a 97
b 98
• The first 32 characters (codes 0 to 31) in ASCII are known as non-printable characters. That is, they
have a significance but are not printable on screen or printer.
• When a computer sorts data, it uses the character codes behind them.
• Note that NULL is character 0 and the symbol/digit 0 is character 48. They’re not the same.