binaryOctal - Binary Decimal Octal and Hexadecimal number...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Binary Decimal Octal and Hexadecimal number systems
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A number can be represented with different base values. We are familiar with the numbers in the base 10 (known as decimal numbers), with digits taking values 0,1,2,…,8,9. A computer uses a Binary number system which has a base 2 and digits can have only TWO values: 0 and 1. A decimal number with a few digits can be expressed in binary form using a large number of digits. Thus the number 65 can be expressed in binary form as 1000001. The binary form can be expressed more compactly by grouping 3 binary digits together to form an octal number. An octal number with base 8 makes use of the EIGHT digits 0,1,2,3,4,5,6 and 7. A more compact representation is used by Hexadecimal representation which groups 4 binary digits together. It can make use of 16 digits, but since we have only 10 digits, the remaining 6 digits are made up of first 6 letters of the alphabet. Thus the hexadecimal base uses 0,1,2,….8,9,A,B,C,D,E,F as digits. To summarize Decimal : base 10 Binary : base 2 Octal: base 8 Hexadecimal : base 16
Background image of page 2
Decimal, Binary, Octal, and Hex Numbers 0 0000 0 0 Decimal Binary Octal Hexadecimal 1 0001 1 1 2 0010 2 2 3 0011 3 3 4 0100 4 4 5 0101 5 5 6 0110 6 6 7 0111 7 7 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Conversion of binary to decimal ( base 2 to base 10) Each position of binary digit can be replaced by an equivalent power of 2 as shown below. 2 n-1 2 n-2 …… …… 2 3 2 2 2 1 2 0 Thus to convert any binary number replace each binary digit (bit) with its power and add up. Example: convert (1011) 2 to its decimal equivalent Represent the weight of each digit in the given number using the above table. 2 n-1 2 n-2 …… …… 2 3 2 2 2 1 2 0 1 0 1 1 Now add up all the powers after multiplying by the digit values, 0 or 1 (1011) 2 = 2 3 x 1 + 2 2 x 0 + 2 1 x 1 + 2 0 x 1 = 8 + 0 + 2 + 1 = 11 Example2: convert (1000100) 2 to its decimal equivalent = 2 6 x 1 + 2 5 x 0 + 2 4 x 0+ 2 3 x 0 + 2 2 x 1 + 2 1 x 0 + 2 0 x 0 = 64 + 0 + 0+ 0 + 4 + 0 + 0 = (68) 10
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

binaryOctal - Binary Decimal Octal and Hexadecimal number...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online