Chapter – 4
Number Systems
Introduction
It is very common in data recovery programming or any other disk troubleshooting programming to handle the different type of number systems simultaneously to perform a single task or even a very small piece of work such as calculating the specific locations of Extended MBR(s) in terms of CHS (Cylinders, Heads and Sectors) and these locations guide the programmer through out the operation(s).
Probably most of the beginning programmers encounter the problem or confusion while converting different type of number systems to one another when attempting to learn assembly language based system level programming and when the use of the binary and hexadecimal number systems is must.
In this chapters we shall discusses many important concepts including the binary, decimal, hexadecimal numbering systems and as well as binary data organization such as conversion of bits, nibbles, bytes, words, and double words etc. and many other related topics of number systems.
Most of the modern computer systems do not represent numeric values using the decimal system but they generally use a binary or 2’s complement numbering system.
There are four number bases commonly used in programming, Binary, Octal Decimal and Hexadecimal. However most of the time we shall meet with Binary, Decimal and Hexadecimal number systems. These number systems have been differentiated according to their base number.
Every numbering system has its own base number and representation symbol. I have presented these four numbers in the following table:
Name of Number System |
Base Number |
Symbol Used for Representation |
Binary |
2 |
B |
Octal |
8 |
Q or O |
Decimal |
10 |
D or None |
Hexadecimal |
16 |
H |
|