Você está na página 1de 5

Number System The radix or base defines the number of symbols needed to represent all possible numbers in the

e number system. Number System Decimal Binary Octal Hexadecimal Base 10 2 8 16 Symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 0, 1 0, 1, 2, 3, 4, 5, 6, 7 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Number System Conversion A. Decimal Binary To convert decimal number to binary, continually divide the number by 2 until the quotient is zero. The remainders give the binary representation of the number in reverse order. Example: 1410 = 11102 2 2 2 2 ) 14 ) 7 ) 3 ) 1 0 Remainder 0 1 1 1

To convert binary number to decimal, multiply the binary digits by the correct power of 2 and sum them. Example: 11102 = 1410 11102 = 1 x 23 + 1 x 22 + 1 x 21 + 0 x 20 =1x8+1x4+1x2+0x1 =8+4+2 = 1410 B. Decimal Octal To convert decimal number to octal, continually divide the number by 8 until the quotient is zero. The remainders give the octal representation of the number in reverse order. Example: 2310 = 278 8 ) 23 8 ) 2 0 Remainder 7 2

To convert octal number to decimal, multiply the octal digits by the correct power of 8 and sum them.

Page 1 of 5

Example: 278 = 2310 278 = 2 x 8 1 + 7 x 80 =2x8+7x1 = 16 + 7 = 2310

C. Decimal Hexadecimal To convert decimal number to hexadecimal, continually divide the number by 16 until the quotient is zero. The remainders give the hexadecimal representation of the number in reverse order. Example: 4610 = 2E16 16 ) 46 16 ) 2 0 Remainder 14 = E 2

To convert hexadecimal number to decimal, multiply the hexadecimal digits by the correct power of 16 and sum them. Example: 2E16 = 4610 2E16 = 2 x 161 + 14 x 160 = 2 x 16 + 14 x 1 = 32 + 14 = 4610

D. Binary Octal To convert binary number to octal, binary digits are grouped into threes starting from the right hand end of the bit pattern and padding the leftmost group with zeros to make a pattern of three (if necessary). Each group of three is coded as a single octal digit similar to converting 3 binary digits to decimal. Example: 110102 = 328 011 3 010 2

To convert octal number to binary, each octal digit is expanded into the equivalent 3 binary digits. Example: 328 = 011 0102 3 011 2 010

Page 2 of 5

E. Binary Hexadecimal To convert binary number to hexadecimal, binary digits are grouped into fours starting from the right hand end of the bit pattern and padding the leftmost group with zeros to make a pattern of four (if necessary). Each group of four is coded as a single hexadecimal digit similar to converting 4 binary digits to decimal. Example: 1010102 = 2A16 0010 2 1010 10 (A)

To convert hexadecimal number to binary, each hexadecimal digit is expanded into the equivalent 4 binary digits. Example: 2A16 = 0010 10102 2 0010 A 1010

Binary Arithmetic Addition Rules: 0+0=0 0+1=1 1+0=1 1 + 1 = 0 carry 1 Multiplication Rules: 0x0=0 0x1=0 1x0=0 1x1=1 Subtraction Rules: 00=0 0 1 = 1 borrow 2 10=1 11=0 Division Rules: 0 0 = undefined 01=0 1 0 = undefined 11=1

Example: Binary Addition 1 1 1 0 + ) 1 1 0 1

0 1 1

0 0 0

Example: Binary Subtraction


0 2

- )

1 1 0

1 0 0

0 1 1

0 0 0

Page 3 of 5

Example: Binary Multiplication X ) 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0

1 1

0 1 1

Example: Binary Division 1 0 ) 1 1 1 1 0 1 1 1 1 1 0 1 r. 1

Octal Arithmetic Example: Octal Addition


1

+ )

3 4 0

5 6 3

Example: Octal Subtraction


0 10 13

1 - )

3 4 6

5 6 7

Example: Octal Multiplication 2 3 X ) 1 5 10 15 2 3 2 13 15


1 1

Page 4 of 5

Hexadecimal Arithmetic Example: Hexadecimal Addition


1

+ )

2 E 1

A E 8

Example: Hexadecimal Subtraction


0 18 21

1 - )

3 5 D

5 D 8

Example: Hexadecimal Multiplication 2 3 X ) 3 5 10 15 6 9 6 19 15


1

Page 5 of 5

Você também pode gostar