Você está na página 1de 2

Binary, Octal, and Hexadecimal Number Systems

Computers store data using binary numbers. Binary numbers take up space to write down, so the octal and hexadecimal number systems are used to abbreviate them.
All data stored in computers are stored in binary format. This is true of all data formats numbers, characters, images and music. This is because storage methods all rely on only two states: "up" or "down" impressions on the surface (mass-produced DVDs), North or South magnets (Hard Disk Drives), reflective or transparent Phase Change Materials (Writeable CD & DVD) etc. Binary is long to write and all numbers look similar, as they are made from only 0 and 1, so short-hand ways to write binary are needed. There are easy-to-use Excel functions to convert between decimal, binary, octal and hexadecimal.

Decimal Number System (Base 10)


This is the most commonly used number system in use by humans today. It uses ten digits, 0 through 9. It is possibly used because humans have ten fingers, and these were used for primitive counting. There is nothing intrinsically "right" about the decimal number system, it is simply one of an infinite number. The number sixty-nine is represented by nine units and one ten, or 69.

Number Systems (Base N)


The example shown for the decimal system may be extended to any number system. The lowest value digit is on the right-hand side, and represents units, like the 9 in 69. The next digit to the left represents the base of the number system, like the 6 in 69. The next digit to the left represents the base squared e.g. 100 in base ten, 64 in base 8 etc.

Binary Numbers (Base 2)


There are two digits used in binary, 0 and 1. The right-most digit represents either zero or one. The next left represents two, the next is two-squared (four), the next is two-cubed (eight), and so on. In computing, one byte is eight binary digits (bits), and the values are: 128 64 32 16 8 4 2 1 To make the number 69, use 0128 + 164 + 032 + 016 + 08 + 14 + 02 + 11

READ THIS NEXT


y y y Types of integers, floating point How Binary Numbers are Used to Store Data Understanding Binary Numbers

= 01000101

Octal Numbers (Base 8)


The main problem with binary numbers is that they take up a lot of space. The number 69 needs two digits in decimal notation, but it needs eight digits using binary. Octal is a shorter method of writing binary. Since the octal base eight is a power of the binary base two ( 8 = 2 ) then binary conversion is very easy. All that is required is to split the binary number 01000101 into groups of three, since eight is two raised to the power of three: 001 000 101 (Note that a leading zero has been added to the "01" at the start of the sequence. Now simply convert each 3-digit binary number to base 8 =105 To check: 5 + 08 + 18 = 5 + 0 + 64 = 69

Hexadecimal Numbers (Base 16)


Hexadecimal is more often converted to and from binary than octal is. The reason is that octal is an odd power of two, and the leading zero in the previous example shows this well. Hexadecimal conversion from binary is even easier than from octal. The binary number is split into two parts: 0100 0101 Each of the four bits (one "nibble", or half a byte) is then converted to base 16: =45 Since base 16 is being used, 16 digits are needed. There are only 10 decimal digits, so the capital letters A to F are used to represent the numbers 10 to 15. A = 10, B = 11, up to F = 15. So, the binary number 1111 1111 is FF in hexadecimal.

Summary of Binary, Octal and Hexadecimal Number Systems


Computer storage methods rely on one of two states to represent "0" and "1", and so data are stored in binary format and coded in a format like ASCII. To make things easier for computer users, long and easily confused binary numbers are converted to octal or hexadecimal. The conversions are very easy, once the process is understood.

Você também pode gostar