Number System
Number System
Number system is a basis for counting various items. Modern computers and other
electronic devices can understand only the digital values 0 and 1. Numbers can be represented in
various forms,
So to handle the electronics devices there is a need to understand the number system and their
conversion from one form to another is essential.
For example,
00012-The base number indicates that the representation is in binary. To find its
equivalent value in decimal
1*20+0*21+0*22+0*23=110
To represent a decimal number from 0-3, only two bit in binary is required. To represent a
decimal number from 0-7, three bits while for representing 0-15, four bits are required. This is
calculated by 2n-1 (23-1=8-1=7).
For example;
14*16°= 14*1 = 14
4594610
For example;
6548[octal number]
4*80=4
5*81=40
6*82=384
42810
HEXADECIMAL TO BINARY NUMBER CONVERSION
It is the reverse process of the earlier conversion shown above. It is only the individual
representation of bits but does not need to perform any calculations in order to convert
hexadecimal numbers to binary. Hexadecimal digits are simply replaced by appropriate binary
digits. Since the maximum hexadecimal digit is equivalent to the decimal number 15(2 n-1), the n
is the number of bits required. So 4 bits are required. For example:
A comparative table below contains the values of numbers 0-255 in three different number
systems. This is probably the easiest way to understand the common logic applied to all the
systems.
27 26 25 24 23 22 21 20
0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1 1
2 0 0 0 0 0 0 1 0 2
3 0 0 0 0 0 0 1 1 3
4 0 0 0 0 0 1 0 0 4
5 0 0 0 0 0 1 0 1 5
6 0 0 0 0 0 1 1 0 6
7 0 0 0 0 0 1 1 1 7
8 0 0 0 0 1 0 0 0 8
a 0 0 0 0 1 0 0 1 9
10 0 0 0 0 1 0 1 0 A
11 0 0 0 0 1 0 1 1 B
12 0 0 0 0 1 1 0 0 C
13 0 0 0 0 1 1 0 1 D
14 0 0 0 0 1 1 1 0 E
15 0 0 0 0 1 1 1 1 F
16 0 0 0 1 6 0 0 0 10
17 0 0 0 1 0 0 0 1 11
253 1 1 1 1 1 1 0 1 FD
254 1 1 1 1 1 1 1 0 FE
255 1 1 1 1 1 1 1 1 FF
MARKING NUMBERS
As there are variety of number systems available to represent the numbers, differentiating
them is important. However, these conversions may cause confusion. For example, what does the
sentence ‘It is necessary to count up 110 products on the assembly line’ actually mean?
Depending on whether it is about binary, decimal or hexadecimal system, the result could be 6,
110 or 272 products, respectively.
The binary takes the suffix b, octal with o and hexadecimal with h. In order to avoid
misunderstanding, different prefixes and suffixes are directly added to the numbers. The prefix $
or 0x as well as the suffix h marks the numbers in hexadecimal system.
For example, the hexadecimal number 10AF may look as $10AF, 0x10AF or 10AFh.
Similarly, binary numbers usually get the prefix % or 0b. If a number has neither suffix nor prefix
it is considered decimal.
BIT
In computer world, the bit is generally refers to 0 and 1.Theory says a bit is the basic unit of
information in computing and digital communications. Let’s forget this for a moment and take a
look at what it is in practice. The answer is “nothing special” a bit is just a binary digit. Similar
to decimal number system in which digits of a number do not have the same value (for example
digits in the decimal number 444 are the same, but have different values), the ‘significance' of bit
depends on its position in the binary number. There is no point talking about units, tens etc., in
binary numbers. It can take up only 0 and 1.
BYTE
A combination of eight bit is one byte. Historically, the byte was the number of bits used to
encode a single character of text in a computer and for this reason it is the smallest addressable
unit of memory in many computer architectures. All mathematical operations can be performed
upon them, like upon common decimal numbers. The greatest value has the leftmost bit called
the most significant bit (MSB). The rightmost bit has the least value and is therefore called the
least significant bit (LSB). Since eight zeros and ones of one byte can be combined in 256
different ways, the largest decimal number which can be represented by one byte is 255 (one
combination represents a zero).
A nibble is referred to as half a byte (4 bit). Depending on which half of the register we are
talking about (left or right), there are ‘high' and ‘low' nibbles, respectively.