Sei sulla pagina 1di 34

1

NUMBER SYSTEM
Decimal Binary Octal Hexadecimal

NUMBER SYSTEMS
A number system is a code that uses symbols to refer to a number of items. In any number system there is an ordered set of symbols known as digits with rules defined for performing arithmetic operations like addition, multiplication etc. A collection of these digits make a number which in general has two parts- integer and fraction.
3

BINARY NUMBER SYSTEM


The number system with base two is known as the binary number. Only two symbols are used to represent numbers in this system and these are 0 and 1. These are known as bits. It is a positional system, that is every position is assigned a specific weight.

Place Value
Example Place value in the decimal system 648 = 600 + 40 + 8 Hundreds Tens units The digit 6 represents 600 because of its placement 3 positions left of the decimal point. The digit 4 represents 40 because of its placement 2 positions left of the decimal point. The digit 8 represents 8 units because of its placement one position left of the decimal point.
5

Place Value in the binary number System


Example1101.00 { Binary point } Place Value Binary Num Positional 8s 1 23 4s 1 22 2s 0 21 1s 1 20

1.Binary to Decimal Conversion


Example (101101.10101)2 = ( )10 10 1101 . 10101 this can be written as, =1x25 + 0x24 + 1x23 + 1x22+ 0x21+ 1x20+ 1x2-1 + 0x2-2 + 1x2-3 + 0x2-4 + 1x2-5 = 32 + 8 + 4 + 1 + 0.5 + 0.125 + 0.03125 = 45 + 0.65625 = (45.65625)10

2.Decimal to Binary Conversion


Decimal numbers can be easily converted to binary numbers by repeatedly dividing the decimal numbers by 2, The remainder after each division is used to indicate the coefficients of the binary number to be formed. Then the binary number derived is written from bottom up.

Decimal to Binary Conversion


Example: (125)10 = ( ) 2 125 62 31 15 7 3 1 2 = 62 + remainder of 1 2 = 31 + remainder of 0 2 = 15 + remainder of 1 2 = 7 + remainder of 1 2 = 3 + remainder of 1 2 = 1 + remainder of 1 2 = 0 + remainder of 1

(125)10 = (1111101) 2
9

Decimal to Binary Conversion


(0.625)10 = ( .101 )2 Fraction (F) Product=F*2 Integer part of product 1.250 0.500 1.000 1 0 1

.625 .250 .50

10

Decimal to Binary Conversion


(125. 625)10 = (1111101.101) 2

11

OCTAL NUMBER SYSTEM


The octal number system has a base of 8. Eight different symbols are used to represent numbers. These are commonly 0,1,2,3,4,5,6 and 7.

12

3.Octal to Decimal number


We use the same method as used in the binary case, except that we now have a radix of 8 instead of 2 (in binary). Example--- (1213)8 = ( )10 =1x83+2x82+1x81+3x8 = 512 + 128+8+3 =(651)10.

13

Octal to Decimal number


(1.123 )8 =1x8+1x8-1+2x8-2+3x8-3 =1 + 1/8 + 2/64 + 3/512 =1+.125+.03125+.00585 =(1.1621)10 (310)8 = 3x82 + lx81 + 0x8 =192 + 8 =(200)10
14

4.Decimal to Octal number


Conversion of decimal to octal can be performed by repeatedly dividing the decimal number by 8 and using each reminder as a digit in the octal number being formed. For example to convert (200)10 to an octal representation we divide as follows. 200 8= 25 remainder is 0 25 8= 3 remainder is 1 3 8= 0 remainder is 3 Therefore (200)10 = (310)8
15

Decimal to Octal number


Notice that when the number to be divided is less than 8, we use 0 as the quotient and the number as the remainder. Convert (0.513)10 to Octal. Ans(0.406517)8

16

5.Binary to Octal number


There is a simple trick of converting a binary number to an octal number. Simply group the binary digits into groups of 3, Starting at the octal point and read each set of 3 binary digits according to the following table.

17

Binary to Octal number

18

Binary to Octal number


Let us convert the binary number 011101. First we break it into 3s (thus 011 101). Then converting each 3 binary digits we get 35 in octal. Therefore (011101)2= (35 )8.

19

6.Octal number to Binary


(67)8=(110 111)2 ( 760512.403)8 =(111110000101001010.100000011)2

20

HEXADECIMAL NUMBER SYSTEM


The Hexadecimal number system has a base of 16 Sixteen different symbols are used to represent numbers. The digits 0 through 9 , A, B, C, D, E , F are used. The following table lists the binary and hexadecimal equivalent of decimal numbers 0 through 15.

21

22

7.Binary to Hexadecimal
We simply break a binary number into groups of 4 bits and convert each group of 4 bits according to the preceding code. Examples (10111011)2 = (BB)16 (10010101)2= (95)16 (11000111)2= (C7)16

23

8.Hexadecimal to Binary
(ABCD)16=(1010101111001101)2 (2309.7A)16 =(0010001100001001.01111010) 2

24

9.Hexadecimal to Decimal
This is straight forward but time consuming. Example: (BB)16 represents =Bx161+Bx16 =11x16+11x1 =176+11 =(187)10 Similarly (AB6)16=Ax162 + Bx161 + 6x16 =10x256 + 11x16 + 6 =2560 + 176 + 6 =(2742)10

25

10. Decimal to Hexadecimal


(10)10 = (A)16 125 16 = 7 + remainder of D(13) 7 16 = 0 + remainder of 7 (125)10 = (7D)16

26

11. Hexadecimal to Octal


(ABC)16 = (101010111100) 2 = (5274)8

Note that , there is no direct method for converting Hexadecimal to octal or Octal to Hexadecimal. Therefore first convert Hexadecimal to Binary then Binary To Octal.

27

12. Octal to Hexadecimal


(234)8 = (010011100) 2 =(09C)16 Besides Decimal, Binary, Hexadecimal and Octal, Many other codes are used in Digital electronics. Eg BCD, Gray Code, ASCII Code.

28

Bits, Bytes, Nibbles and Word Size


Bit(1), Nibble(4) and Byte(8) are names for common data groups. Word size or Word length is a data group that is important in computers.

29

BIT
A single binary number (either a 0 or a 1) is called a bit. Bit is an abbreviation for a Binary digit. The bit is the smallest unit of data in a digital system. Physically in a digital circuit a single bit is commonly represented by a HIGH or LOW voltage.

30

BIT
On a magnetic storage medium (such as a floppy disk) a bit is a small section that can be either a 1 or 0. On an optical disk (such as a CD-ROM) a bit is a small area that either is a pit or no pit for a 1 or 0.

31

WORD SIZE
All but the simplest digital devices handle larger data groups commonly called which in computer jargon may be called words. For most computer systems, the width of the main data bus is the same as the word size. For instance, a microprocessor might operate on and store 8-bit groups as a single unit of data.

32

BYTE
An 8-bit group of data that represents a number, letter, punctuation mark, control character, or some operation code (op code) in a digital device is called a byte. For instance, the hexadecimal number 4F is shorthand for the byte 0100 1111. A Byte is an abbreviation for Binary term

33

NIBBLE
A half-byte or a 4-bit group of data is called a nibble. For instance, the hexadecimal number C is shorthand for the nibble 1100.

34

Potrebbero piacerti anche