BC 17 DD QCRLecture 29 TH October 2024
BC 17 DD QCRLecture 29 TH October 2024
10 / 2024
Number System
Many number systems are in use in digital technology. The most common are the
decimal, binary, octal and hexadecimal systems.
Decimal (Base-10)
Binary (Base-2)
Octal (Base-8)
Hexadecimal (Base-16)
2
Hexadecimal Numbers
• The hexadecimal number system has sixteen characters; it is used primarily as a
compact way of displaying or writing binary numbers because it is very easy to
convert between binary and hexadecimal.
• As you are probably aware, long binary numbers are difficult to read and write
because it is easy to drop or transpose a bit.
• Since computers and microprocessors understand only 1s and 0s, it is necessary
to use these digits when you program in “machine language.”
• Imagine writing a sixteen bit instruction for a microprocessor system in 1s and 0s
• It is much more efficient to use hexadecimal or octal.
Hexadecimal Numbers
Octal Numbers
• Like the hexadecimal number system, the octal number system provides a convenient
way to express binary numbers and codes.
• However, it is used less frequently than hexadecimal in conjunction with computers
and microprocessors to express binary quantities for input and output purposes.
ASCII Numbers
• A computer keyboard has a dedicated microprocessor that constantly scans
keyboard circuits to detect when a key has been pressed and released.
• A unique scan code is produced by computer software representing that
particular key.
• The scan code is then converted to an alphanumeric code (ASCII) for use
by the computer.
• Most computer keyboards are standardized with the ASCII.
• When you enter a letter, a number, or control command, the corresponding
ASCII code goes into the computer.
• ASCII has 128 characters and symbols represented by a 7-bit binary code.
• Actually, ASCII can be considered an 8-bit code with the MSB always 0.
• This 8-bit code is 00 through 7F in hexadecimal.
ASCII Numbers