Beruflich Dokumente
Kultur Dokumente
Decimals
To understand Binary and Hexadecimal numbers, it is best to know how Decimal Numbers work. Every digit in a decimal number has a "position", and the decimal point helps us to know which position is which. The position just to the left of the point is the "Units" position. Every position further to the left is 10 times bigger, and every position further to the right is 10 times smaller:
Now, this is just a way of writing down a value. Other ways include Roman Numerals, Binary, Hexadecimal, and more. You could even just draw dots on a sheet of paper! The Decimal Number System is also called "Base 10". Because it is based on the number 10. And there are 10 symbols (0,1,2,3,4,5,6,7,8 and 9), but notice something interesting: there is no symbol for "ten". "10" is actually two symbols put together, a "1" and a "0": In decimal you count "0,1,2,3,4,5,6,7,8,9,..." but then you run out of symbols! So you add 1 on the left and then start again at 0: 10,11,12, ...
But you don't have to use 10 as a "Base". You could use 2 ("Binary"), 16 ("Hexadecimal"), or any number you want to! Example: In binary you count "0,1,..." but then you run out of symbols! So you add 1 on the left and then start again at 0: 10,11 ... See how you would count dots using Bases from 2 to 16 in this little demonstration: So the general rule is: Count up until just before the "Base", then start at 0 again, but first you add 1 to the number on your left.
Binary Numbers
Binary Numbers are just "Base 2" instead of "Base 10". So you start counting at 0, then 1, then you run out of digits ... so you start back at 0 again, but increase the number on the left by 1. Like this:
000 001 010 ... and add one to the number on the left 011
start back at 0 again, and add one to the number on the left... 100 ... but that number is already at 1 so it also goes back to 0 ... ... and 1 is added to the next number on the left there is no "2" in binary, so start back at 0 ...
Hexadecimal Numbers
Hexadecimal numbers are interesting. There are 16 of them! They look the same as the decimal numbers up to 9, but then there are the letters ("A',"B","C","D","E","F") in place of the decimal numbers 10 to 15. So a single Hexadecimal digit can show 16 different values instead of the normal 10 like this:
Decimal: Hexadecimal:
0123456789
1 1 1 1 1 1 0 1 2 3 4 5
0123456789A B C D E F
110100
Example of a Binary Number There is no 2,3,4,5,6,7,8 or 9 in Binary!
Then 1
Decimal
Well how do we count in Decimal?
0 ... 9
Start at 0 Count 1,2,3,4,5,6,7,8, and then... This is the last digit in Decimal
10
The same thing is done in binary ...
Binary 0 1 10 11 ???
Start at 0
Then 1
1 more
Decimal
What happens in Decimal ... ?
99 100
When we run out of digits, we ... ... start back at 0 again, but add 1 on the left
Binary 0 1 10
Start at 0
Then 1
11
start back at 0 again, and add one to the number on the left... ... but that number is already at 1 so it also goes back to 0 ... ... and 1 is added to the next position on the left
1 00
Decimal vs Binary
Here are some equivalent values: 1 1 1 1 1 1 0 1 2 3 4 5 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1
Decimal:
0 1 2 3 4 5 6 7 8 9
Binary:
1 1 1 1 1 1 1 0 0 0 1 10 0 0 1 1 1 0 0 0 1 0 1 0 1
Decimal:
20
25
30
40
50
100
200
500
Binary:
1111 1010 1100 1111 1010 1100 1100 1100 1010 0 1 0 00 10 100 1000 0
Numbers can be placed to the left or right of the point, to indicate values greater than one or less than one.
The number to the left of the point is a whole number (10 for example)
As we move further right, every number place gets 2 times smaller (half as big).
Example: 10.1
The "10" means 2 in decimal, The ".1" means half, So "10.1" in binary is 2.5 in decimal You can do conversions at Binary to Decimal to Hexadecimal Converter.
Words
The word binary comes from "Bi-" meaning two. We see "bi-" in words such as "bicycle" (two wheels) or "binocular" (two eyes). When you say a binary number, pronounce each digit (example, the binary number "101" is spoken as "one zero one", or sometimes "one-oh-one"). This way people don't get confused with the decimal number.
A single binary digit (like "0" or "1") is called a "bit". For example 11010 is five bits long. The word bit is made up from the words "binary digit"
Examples
Example: What is 11112 in Decimal?
The "1" on the left is in the "222" position, so that means 1222 (=8) The next "1" is in the "22" position, so that means 122 (=4)
The next "1" is in the "2" position, so that means 12 (=2) The last "1" is in the units position, so that means 1 Answer: 1111 = 8+4+2+1 = 15 in Decimal
Hexadecimals
A Hexadecimal Number is based on the number 16
This is 21616 + 1416 + 6 + 10/16 + 3/(1616) Read below to find out why
Numbers can be placed to the left or right of the point, to indicate values greater than one or less than one: The number just to the left of the point is a whole number, we call this place units. As we move left, every number place gets 16 times bigger.
The first digit on the right of the point means sixteenths(1/16). As we move further right, every number place gets 16 times smaller (one sixteenth as big).
16 Different Values
The Hexadecimal numbers look the same as the decimal numbers up to 9, but then there are the letters ("A',"B","C","D","E","F") in place of the decimal numbers 10 to 15:
Decimal: Hexadecimal:
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 10 11 12 13 14 15 9 A B C D E F
So a single Hexadecimal digit can show 16 different values instead of the normal 10.
Definition of Hexadecimal
The word "Hexadecimal" means "based on 16" (From Greek hexa: "six" and Latin decima: "a tenth part").
Examples
Example 1: What is 2E6 (Hexadecimal)?
y y y y The "2" is in the "1616" position, so that means 21616 The "E" is in the "16" position, so that means 1416 The "6" is in the "Units" position so that means 6. Answer: 2E6 = 21616 + 1416 + 6 (=742 in Decimal)