You are on page 1of 18

Number Systems Quantities/Counting?

Common Number Systems? Decimal Binary Octal Hexa-Decimal


System Base Symbol Used by Used in 0 0 0 0
s humans? Computers?
1 1 1 1
Decimal 10 0,1,…..9 Yes No
2 10 2 2
Binary 2 0,1 No Yes
3 11 3 3
Octal 8 0,1,…..7 No No
4 100 4 4
Hexa- 16 0,1, No No 5 101 5 5
Decimal …..9A,
B,.F 6 110 6 6
7 111 7 7
8 1000 10 8
16 10000 20 10 9 1001 11 9
17 10001 21 11 10 1010 12 A
18 10010 22 12 11 1011 13 B
19 10011 23 13 12 1100 14 C
20 10100 24 14 13 1101 15 D
21 10101 25 15 14 1110 16 E
22 10110 26 16 15 1111 17 F
23 10111 27 17
The binary coded decimal (BCD) is a type of binary code used to represent a given decimal
number in an equivalent binary form.
The most common BCD code is the 8421 BCD code.
Here 8, 4, 2 and 1 represent the weights of different bits in the four-bit groups, starting from
the (MSB) most significant bit (to extreme left) and proceeding towards the least significant
(LSB) bit.
The possibilities:
Conversion Among Bases

Binary to Decimal:

Technique :
– Multiply each bit by 2n , where n
is the “weight” of the bit
– The weight is the position of the
bit, starting from 0 on the right
– Add the results
Example
Octal to Decimal:
Hexadecimal to Decimal:
Technique:
Technique: – Multiply each bit by 16n , where n
– Multiply each bit by 8n , where n is the is the “weight” of the bit
“weight” of the bit – The weight is the position of the
– The weight is the position of the bit, bit, starting from 0 on the right
starting from 0 on the right – Add the results
– Add the results Example
Example

Decimal to Binary:
Technique:
– Divide by two, keep track of the
remainder
– First remainder is bit 0 (LSB, least-
significant bit)
– Second remainder is bit 1
– Etc.
Octal to Binary:
Technique – Convert each octal digit to a 3-bit equivalent binary representation .

Hexadecimal to Binary:
Technique – Convert each hexadecimal digit to a 4-bit equivalent binary representation.

Decimal to Octal:
Technique :
– Divide by 8
– Keep track of the remainder
Decimal to Hexadecimal:
Technique :
– Divide by 16
– Keep track of the remainder

Binary to Octal :
Technique:
– Group bits in threes, starting on right
– Convert to octal digits
Binary to Hexadecimal:
Technique :
– Group bits in fours, starting on right
– Convert to hexadecimal digits

Octal to Hexadecimal:
Technique – Use binary as an intermediary
Hexadecimal to Octal:
Technique – Use binary as an intermediary
Exercise – Convert ...

Decimal Binary Octal Hexa-Decimal


33 100001 41 21
117 1110101 165 75
451 111000011 703 1C3
431 110101111 657 1AF

Convert (FA98)16 Hexadecimal to binary number (?)2


Convert (3FDA)16 Hex to binary number (?)2
For Fractional Numbers …
Binary to Decimal: Decimal to decimal:
Octal to decimal number system
Convert (2 1. 2 1)8= (? )10 >>Convert Fractional Hex to Decimal
= 2 x 81 + 1 x 80 . 2 x 8-1 + 1 x 8-2 Convert ( E F . B 1 )16= ( ? )10
= 2 x 8 + 1 x 1. 2 x ( 1 / 8 ) + 1 x ( 1 / 64 )
Ans: 2 3 9 . 6 9 1 4 0 6
= 16 + 1 . (0. 2 5) + (0. 0 1 5 6 2 5)
= 17 + 0. 265625 Convert ( 0.9D9 )16= ( ? )10

= 17. 265625 Ans : 0 . 6 1 5 4 7 8 2

Therefore (2 1. 2 1)8 = (1 7. 2 6 5 6 2 5)10 Convert ( BCC.1 0 )16= ( ? )10


Convert (A9.5B4) fractional hex to fractional binary
Ans : (3 0 2 0 . 0 6 2 5
Octal to Binary Conversion:
The base of the octal number system (8) is the third power of base of a binary system (2).
Ex: Convert the octal number 35.346 to its equivalent binary number.

binary number is 011101.011100110

Binary to Octal Conversion:


Ex: Convert binary number 010100111.100011 into octal number 

So,The required octal number is 257.43


Binary Addition: Multiplication
Two 1-bit values Binary, two 1-bit values

Here we will get carry as 1


Decimal to binary
Exercise – Convert ...
Exercise – Convert …
Computer memory is measured in terms of how many bits it can store. Here is a chart for
memory capacity conversion.
1 byte (B) = 8 bits
1 Kilobytes (KB) = 1024 bytes
1 Megabyte (MB) = 1024 KB
1 Gigabyte (GB) = 1024 MB
1 Terabyte (TB) = 1024 GB
1 Exabyte (EB) = 1024 PB
1 Zettabyte = 1024 EB
1 Yottabyte (YB) = 1024 ZB

You might also like