NUMBER SYSTEM
Computer - Memory Units
Memory unit is the amount of data that can be stored in the
storage unit. This storage capacity is expressed in terms of Bytes.
The following table explains the main memory storage units −
Sr. Unit & Description
No.
1 Bit (Binary Digit): A binary digit is logical 0 and 1 representing a passive or an active state
of a component in an electric circuit.
2 Nibble: A group of 4 bits is called nibble.
3 Byte: A group of 8 bits is called byte. A byte is the smallest unit, which can represent a
data item or a character.
4 Word: A computer word, like a byte, is a group of fixed number of bits processed as a
unit, which varies from computer to computer but is fixed for each computer.
Computer - Memory Units
The following table lists some higher storage units −
Sr. No. Unit & Description
1 Kilobyte (KB) (1 KB = 1024
Bytes)
2 Megabyte (MB) (1 MB = 1024 KB)
3 GigaByte (GB) (1 GB = 1024 MB)
4 TeraByte (TB) (1 TB = 1024 GB)
5 PetaByte (PB) (1 PB = 1024 TB)
6 ExaByte (EB) (1EB = 1024 PB)
NUMBER SYSTEM
The technique to represent and work with numbers is called number
system.
Decimal number system is the most common number system.
Other popular number systems include binary number system, octal
number system, hexadecimal number system, etc.
In general, the binary number system is used in computers.
DECIMAL NUMBER SYSTEM
Decimal number system is a base 10 number system having 10 digits from 0 to 9.
This means that any numerical quantity can be represented using these 10 digits.
Decimal number system is also a positional value system. This means that the
value of digits will depend on its position.
Let us take an example to understand this: Say we have three numbers – 734, 971
and 207. The value of 7 in all three numbers is different−
DECIMAL NUMBER SYSTEM
In 734, value of 7 is 7 hundreds or 700 or 7 × 100 or 7 × 102
In 971, value of 7 is 7 tens or 70 or 7 × 10 or 7 × 101
In 207, value 0f 7 is 7 units or 7 or 7 × 1 or 7 × 100
The weightage of each position can be represented as follows −
BINARY NUMBER SYSTEM
The easiest way to vary instructions through electric signals is two-
state system – on and off.
On is represented as 1 and off as 0, though 0 is not actually no signal
but signal at a lower voltage.
The number system having just these two digits – 0 and 1 – is
called binary number system.
Each binary digit is also called a bit.
BINARY NUMBER SYSTEM
Binary number system is also positional value system, where each digit has a
value expressed in powers of 2, as displayed here:
In any binary number, the rightmost digit is called least significant bit (LSB) and
leftmost digit is called most significant bit (MSB).
OCTAL NUMBER SYSTEM
Octal number system has eight digits – 0, 1, 2, 3, 4, 5, 6 and 7.
Octal number system is also a positional value system with where
each digit has its value expressed in powers of 8, as shown here −
HEXADECIMAL NUMBER SYSTEM
Hexadecimal number system has 16 symbols – 0 to 9 and A to F
where A is equal to 10, B is equal to 11 and so on till F.
Hexadecimal number system is also a positional value system with
where each digit has its value expressed in powers of 16, as shown
here −
COMMON NUMBER SYSTEMS
Number system Base(Radix) Used digits Example
Binary 2 0,1 (11110000)2
Octal 8 0,1,2,3,4,5,6,7 (360)8
Decimal 10 0,1,2,3,4,5,6,7,8,9 (240)10
Hexadecimal 16 0,1,2,3,4,5,6,7,8,9, (F2)16
A,B,C,D,E,F
CONVERSIONS
DECIMAL TO OTHER
Decimal Number System to Other Base:
To convert Number system from Decimal Number System to Any
Other Base is quite easy; you have to follow just two steps:
Divide the Number (Decimal Number) by the base of target base
system (in which you want to convert the number: Binary (2), octal (8)
and Hexadecimal (16)).
Write the remainder from step 1 as a Least Signification Bit (LSB) to Step
last as a Most Significant Bit (MSB).
DECIMAL TO BINARY
DECIMAL TO BINARY (FRACTIONAL)
DECIMAL TO OCTAL
DECIMAL TO OCTAL (FRACTIONAL)
DECIMAL TO HEXADECIMAL
DECIMAL TO HEXADECIMAL
(FRACTIONAL)
BINARY TO DECIMAL
BINARY TO DECIMAL (FRACTIONAL)
BINARY TO OCTAL
An easy way to convert from binary to octal is to group binary digits into sets of
three, starting with the least significant (rightmost) digits.
Then, look up each group in a table:
Binary 000 001 010 011 100 101 110 111
Octal 0 1 2 3 4 5 6 7
Binary= 011 100 101
Octal= 3 4 5 =345 oct
BINARY TO OCTAL (FRACTIONAL)
BINARY TO OCTAL (FRACTIONAL)
BINARY TO HEXADECIMAL
An equally easy way to convert from binary to hexadecimal is to group binary
digits into sets of four, starting with the least significant (rightmost) digits.
Binary: 11100101 = 1110 0101
Then, look up each group in a table:
BINARY TO HEXADECIMAL
(FRACTIONAL)
OCTAL TO BINARY
Converting from octal to binary is as easy as converting from binary
to octal. Simply look up each octal digit to obtain the equivalent
group of three binary digits.
OCTAL TO BINARY (FRACTIONAL)
OCTAL TO HEXADECIMAL
When converting from octal to hexadecimal, it is often easier to first convert the
octal number into binary and then from binary into hexadecimal. For example,
to convert 345 octal into hex:
Drop any leading zeros or pad with leading zeros to get groups of four binary
digits (bits): Binary 011100101 = 1110 0101
Then, look up the groups in a table to convert to hexadecimal digits.
OCTAL TO HEXADECIMAL
• Therefore, through a two-step conversion process, octal 345
equals binary 011100101 equals hexadecimal E5.
OCTAL TO HEXADECIMAL
(FRACTIONAL)
OCTAL TO DECIMAL
The conversion can also be performed in the conventional
mathematical way, by showing each digit place as an increasing
power of 8.
(345)8= (3 * 8^2 ) + (4 * 8^1 ) + (5 * 8^0 )
= (3 * 64) + (4 * 8) + (5 * 1)
= (229)10
OCTAL TO DECIMAL (FRACTIONAL)
HEXADECIMAL TO BINARY
Converting from hexadecimal to binary is as easy as converting
from binary to hexadecimal. Simply look up each hexadecimal digit
to obtain the equivalent group of four binary digits.
HEXADECIMAL TO BINARY
(FRACTIONAL)
HEXADECIMAL TO OCTAL
When converting from hexadecimal to octal, it is often easier to first convert the
hexadecimal number into binary and then from binary into octal. For example,
to convert A132 hex into octal:
hexadecima A 1 3 2
l=
binary 1010 0001 0011 0010 =1010000100110010
binary
Drop any leading zeros or pad with leading zeros to get groups of four binary
digits (bits):
binary 1010000100110010= 001 010 000 100 110 010
Then, look up the groups in a table to convert to octal digits.
HEXADECIMAL TO OCTAL
Binary 000 001 010 011 100 101 110 111
Octal 0 1 2 3 4 5 6 7
Binary 001 010 000 100 110 010
Octal 1 2 0 4 6 2 =120462
oct
• Therefore, through a two-step conversion process,
hexadecimal A132 equals binary 1010000100110010
equals octal 120462.
HEXADECIMAL TO OCTAL
(FRACTIONAL)
HEXADECIMAL TO DECIMAL
The conversion can also be performed in the conventional
mathematical way, by showing each digit place as an increasing
power of 16.
C5 octal = (12 * 16^1 ) + (5 * 16^0 ) = 192 + 5 = (197)10
HEXADECIMAL TO DECIMAL
(FRACTIONAL)