How to Count in the Binary and Hexadecimal Numbering Systems
2 Steps
Did you know that there are other systems of numbering other than our standard decimal system?

The first numbering system was base 60.

The decimal system, or base 10, is in mathematics and everyday life, but computers and other electronics need to have simpler (sometimes more complex) systems. Enter, binary.
Remove these ads by Signing Up

## Step 1: Hex decimal

ok hex decimal is like real counting but it uses numbers and letters.
the numbers 1-20 using hex decimal:

1
2
3
4
5
6
7
8
9
a
b
c
d
e
f
10
11
12
13

as you can see it uses the letters a-f to repesent real numbers.
so every time you get to nine you go to a and so on. so 100 in hexdecimal is 64.
hex decimal is usely used in video games becauses you can fit big numbers in small space.
 1-40 of 64 Next »
nutsandbolts_64 says: Jul 24, 2010. 11:20 PM
How to convert hexadecimal to decimal and vice-versa! Behold, the wonders of Math! Binary takes a lot of time to master. I gotta make another formula for converting binary into pretty much everything else.
dsman195276 (author) says: Jul 25, 2010. 8:05 PM
I wrote a piece of program code that uses math to convert any base number into any other base(with a conversion to base 10 in between to make it a little simpler since bases other then 10 have to be stored as string variables)

The formula for converting bases is very simple. For conversion from base N to base 10 you simply do this:

take each digit in the Base N number(Convert it to it's representative base 10 number) and multiply it by N (to the power of) the digit place. the digit place starts at 0 at the far right of the number, and goes up by 1 for each digit. Then add the totals of all the digits.

EX.

10011010 (154)
working from right to left
0 * (2 ^ 0) = 0
1 * (2 ^ 1) = 2
0 * (2 ^ 2) = 0
1 * (2 ^ 3) = 8
1 * (2 ^ 4) = 16
0 * (2 ^ 5) = 0
0 * (2 ^ 6) = 0
1 * (2 ^ 7) = 128
=(add up all the totals)
154

And a Hexadecimal word(Two bytes):

1A3F(6719)
16 * (16 ^ 0) = 16
3 * (16 ^ 1) = 48
10 * (16 ^ 2) = 2560
1 * (16 ^ 3) = 4096
=(add up the totals)
6719
(both examples were checked with the windows calculator)

To convert from base 10 to base N, you use a little division, and Modulus math. You MOD by your Base to get your Base digit(you convert the base 10 number into your digit like you would 10 into "A") and then divide your current number by the base until your current number is less then your base. You take the remainder and convert it into your last digit. And then take these digits and put them from right to left to make your number.

EX. 1264 to a Hex word

1264 mod 16 = 0 (Your right most digit will be 0). 1264 \ 16 (decimals are ignored) = 79
79 mod 16 = 15(F). 79 \ 16 = 4
4 is less then 16, so we make 4 our first digit. so 1264 in a Hex word is :
4F0 (Since this is a Hex word though, it would be 04F0 with a leading 0 so it represents two bytes)

or convert 1264 into a binary word(though it would be simpler to convert the above hex word into binary then preform all these steps again)
1264 mod 2 = 0. 1264 \ 2 = 632
632 mod 2 = 0. 632 \ 2 = 316
316 mod 2 = 0. 316 \ 2 = 158
158 mod 2 = 0. 158 \ 2 = 79
79 mod 2 = 1. 79 \ 2 = 39
39 mod 2 = 1. 39 \ 2 = 19
19 mod 2 = 1. 19 \ 2 = 9
9 mod 2 = 1. 9 \ 2 = 4
4 mod 2 = 0. 4 \ 2 = 2
2 mod 2 = 0. 2 \ 2 = 1
1 < 2. first digit is 1. so:
10011110000. or 000000100 11110000 in two bytes.

I hope this cleared up some stuff for you :)
nutsandbolts_64 says: Jul 26, 2010. 3:33 AM
WOW *views link* oh, I get it now. lol, thanks!
dsman195276 (author) says: Jul 26, 2010. 9:07 AM
I think i might have forgot that integer devision is used, not normal devision(It could possibly work with normal. I use integer division since it's simpler and always works) The cool thing about this math is that you can convert into any base you like. such as base 3, or base 8(Octadecimal I believe). Of coarse i'm not sure what you do for bases after base 36(Base 36 uses Z as it's highest number. I'm not sure what letter, or symbol you start using after you get to Z).In my program. I just continued using the ASCII characters after the alaphabet. I believe a backslash comes after Z if i'm not mistaken.
Millawi Legend says: Jun 16, 2010. 12:17 PM
00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01010 i give up... i can count in binary but it takes me ages...
nutsandbolts_64 says: Jul 23, 2010. 11:33 PM
if I'm correct those numbers are: 12345...... AAAAAARGGGGHHHH!!!!!!!!!!!!!!! lol, try counting in hexadecimal.

Millawi Legend says: Jun 16, 2010. 12:21 PM
Lol, If you count to 5 in binary on your hands...
dsman195276 (author) says: Jun 16, 2010. 2:45 PM
......4
Millawi Legend says: Jun 18, 2010. 12:57 PM
Forget it.
Millawi Legend says: Jun 18, 2010. 12:54 PM
I mean this: ....................../´¯/) ....................,/¯../ .................../..../ ............./´¯/'...'/´¯¯`·¸ ........../'/.../..../......./¨¯\ ........('(...´...´.... ¯~/'...') .........\.................'...../ ..........''...\.......... _.·´ ............\..............( ..............\.............\...
dsman195276 (author) says: Jun 18, 2010. 9:49 PM
Assuming my assumption is correct, You tried to draw a middle finger correct? You would have only your middle finger up when you count to 4, not 5(Of coarse, this depends on what finger you start with, it would be 4 counting from your pinky, and 2 counting from your index finger).
Millawi Legend says: Jun 18, 2010. 12:57 PM
no, this MMMMLE99EEJJzzQDPLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMM^[/////////////[[#\\:xxx ^_&&@HH33pWWN7999EEEJzzzzQQQQQQQQQQQQQQQQzzJJEE9999997N77NWpppNMMM MMMM@[////////////////////////////////////////////////////////////////////////////////////// MMM MMMM3[//////////////////////////////////////////////////////////////////////////////////////&MMM MMMMp///////////////////////////////////////////////////////////////////////////////////////dMMM MMMMp///////////////////////////////////////////////////////////////////////////////////////pMMM MMMMp////////////////////////////////////////[[[////////////////////////////////////////////7MMM MMMM3////////////////////////////////////:@p9JzzE77NWppd\///////////////////////////////////9MMM MMMM@///////////////////////////////////[7WzQPPLPPLLLLLPJ#//////////////////////////////////zMMM MMMM@///////////////////////////////////[9x_&DLLLLLMMMLLP_:#///////////////////////////////[DMMM MMMM_///////////////////////////////////[d:&3PLMLLMMMMMLL@W7[//////////////////////////////[LMMM MMMM^/////////////////////////////////[_[H\_NPLMLLMMMMMML 9z#//////////////////////////////[LMMM MMMM /////////////////////////////////[E# x^HPLMLLMMMMMLDxQE[//////////////////////////////\MMMM MMMM //////////////////////////////////9^x@@NPLMLLMMMMML33DH///////////////////////////////xMMMM MMMM //////////////////////////////////d7\3&WWWWN7QLMLL9\DDx///////////////////////////////xMMMM MMMM //////////////////////////////////pQHx d9QDDQzLLD3 DE//////////////////////////////// MMMM MMMM //////////////////////////////////9D9&:&3p7E7P7@WNExQ&////////////////////////////////&MMMM MMMMx//////////////////////////////////pDPDQPL9Wp&HQ79W\^J#////////////////////////////////dMMMM MMMMx//////////////////////////////////NDDDPLLLLPPLLLPN:Q3/////////////////////////////////3MMMM MMMMx//////////////////////////////////@@dd__Hp^^d7JJP WD^/////////////////////////////////NMMMM MMMMx//////////////////////////////////7DLLL93JDz@xWEQxDD\/////////////////////////////////7MMMM MMMM //////////////////////////////////@W7LLLz7E7W&QLEdPJ//////////////////////////////////zMMMM MMMM [////////////////////////////////[379PLLMMMLLMMLDQLp//////////////////////////////////QMMMM MMMM^[////////////////////////////////xWPLLMMMMMMMMMMMLL //////////////////////////////////DMMMM MMMM_[////////////////////////////////:37QLMMMMMMMMMLEPPx/////////////////////////////////[LMMMM MMMM&[////////////////////////////////^7WWNEMMMMMMMML_PP#/////////////////////////////////\MMMMM MMMM&[////////////////////////////////pzD9LMMMMMMMMML_DD#/////////////////////////////////:MMMMM MMMMd[///////////////////////////////\ddDLMMMMMMMMMML_9E\/////////////////////////////////xMMMMM MMMM3[//////////////////////////////[ NPLMMMMMMMMMMML@&d[/////////////////////////////////^MMMMM MMMMH[////////////////////////////// zPLMMMMMMMMMMMML 3p[/////////////////////////////////@MMMMM MMMMH[//////////#\x xx#\[[#////////3DLMMMMMMMMMMMMMJ:J9[/////////////////////////////////3MMMMM MMMM3[/////////# W9_E@N&d799 ^& d&/^QPLMMMMMMMMMMMMLp D7//////////////////////////////////WMMMMM MMMMH[////////xJz3^9DQzJ7EJJJd^39p[7QDDPLLLDQDPMMMML3dP9//////////////////////////////////NMMMMM MMMMH[///////[WQDDJQDQJN@x:x &3H@@[@7WWp9D9W9zDLLMMLWNPJ[/////////////////////////////////7MMMMM MMMM3[///////xEQPPPJ@x#: &@@_x##xp:^JDEpHWN7Npp7EEDLNWPE[/////////////////////////////////EMMMMM MMMM3#//////[WEzDQ&#x3d&@p7EEEJW [\\9JzLLDNd3W7JLMLL9@D3[[[x&3WW3&x#//////////////////////EMMMMM MMMMp[/////#39EJW\#3PLLPz9Np3WQDz3#_zLLLMMLLPQPLMMLzQ^E&#\NDPz77N3& x:////////////////////EMMMMM MMMM3#[//[ NW 37#[NPEHLLLLLLLLPDW&#HDDQLMMMMMMMMMMP@Q_9x#dLLLPE7EzzEWd&[//////////////////7MMMMM MMMMp#[[_pW^\H9&[_DJxQLLLLLLLLLJd [3PLLMMMMMMMMMMMJWzWW\\JLMMMMMLLLLDzE^//////[##[////////NMMMMM MMMMN## x# 7EE [NQ_HLLLLLLLLPP7d^[dLMMMMMMMMMMMMM79zd3#xPMMMMMMMLLPDQJW///#_3N77d\//////[WMMMMM MMMM7#:&d\\9EEE:/Nz 7LMLLLLMLQz9W^[dLMMMMMMMMMMMMM7JLJ^#&LMMMMMMMML7H9z9[/\WN7EWWH //////[WMMMMM MMMMW#xNWx:NpEEx[H33EDLLLLLLMLLzW&[&LMMMMMMMMMMMMM9JLL \NMMMMMMMMML3 @J9[[@pW7zzEH [/////[WMMMMM MMMMW#\&^x\ 7EE\[HN@@&7EPLMLLML93 [&PLMMMMMMMMMMMMEELQ::DMMMMMMMMLP9^&9N[:E3@Hzz9@3://///[pMMMMM MMMMp#[_&&@^EEE#/dzHH37EDLLLLLLPN [_7LMMMMMMMMMMMMzNL7\ LMMMMMMMMLQ__\3d[_NW7zzJpNQJ#////[pMMMMM MMMMH#[#_33^9EE#[HN HEz99p3LLLLLN [HzLLLLMMMMMMMMMJ3LH\HLMMMMMMMMLPH3 N [dE9JQzE@zPD&////[WMMMMM MMMMd[//x Wd:WW[#7W@E&DLLLLLLLLL9:[^DLNdN9LMMMMMMMEdL&:JMMMMMMMMMLPD@ 9x#3pp3WJ9 _ Jp////[WMMMMM MMMMd[//[^^dNE [ zQDD7NLMMMLLLLLDx#_QLLPJ9NzMMMMMLd3J_xLMMMMMMMMMLP9 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////[ 3N7997&\p_7Hd^HzPPLLLLLLLLLLLLLLLLLLLLLLPPDDDJ7QJJDQQQzJJ3HWd@xWzQp://////[NMMMM MME[////////////[xdW3x ^^_d799QDDPPLLLLPPLPPQPDQzPPPPDEdd 7xN7x97zJEEWd ^@ H px////////[HMMMM MM3[///////////////#x^x\# xx__NEzzQDDDDWW@pDNdxp xdQQQzzE3\H^H H & N3 :###[##[#[[/////////[ MMMM MM [///////////////////////////[xH9JJJd^ ^JzEH ^dp @^^dpN @x3:_^&x #//////////////////////[:MMMM ML:[//////////////////////////////[:^xH__H3W3\x\\[/////[[###\\#[//////////////////////////[#PMMM ML:[//////////////////////////////////[///////////////////////////////////////////////////[#9MMM MM [[/////////////////////////////////////////////////////////////////////////////////////[#WMMM MMQ^\[[///////////////////////////////////////////////////////////////////////////////////[#&MMM MMMMLz7pd_ x\#[//////////////////////////////////////////////////////////////////////////[[#xLMM MMMMMMMMMMMMMLPz9WH_x\[///////////////////////////////////////////////////////////[[#\:x &3NEMMM MMMMMMMMMMMMMMMMMMMMMMLDzEN3d&^ xxx::\\\##[[////////////[#\::x _&&@HH3pN79EJzQDPLLLMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMLLLLLLLLPPLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
Saturn V says: Aug 11, 2010. 7:26 PM
And that is? I am not fluent in jiberishese.
PKTraceur says: Mar 2, 2009. 8:23 AM
Can somone confirm if this is right? 1 01 11 001 010 011 111 0001 0010 0011 0111 1111 00001 00010 00011 00111 01111 11111 000001 000010 000011 000111 001111 011111 111111
cowscankill says: Nov 23, 2009. 3:44 PM
Errr not really... I say Binary is the easiest thing in the world, but hard to "get" Here is how I would count it:
00001 = 1
00010 = 2
00011 = 3
00100 = 4
00101 = 5
00110 = 6
00111 = 7
Think of the columns as powers of 2, the first being 2^0 That means from right to left, the columns would be 1, 2, 4, 8, 16, and so on. Place a 1 in the column were you need the number. If I were doing 15, I would place it in the largest column that fits. It is smaller than 16, but larger than 8, so I place it in 8.
01111 = 15
All binary odd numbers HAVE to have a 1 in the 2^0 column. The opposite goes for even numbers.
amando96 says: Feb 21, 2010. 2:39 PM
I find internet tutorials on binary to dec, and vice versa, quite hard to understand, i'm about to make a really simple one, i even taught it this way to my younger brother in like 15 seconds...
dsman195276 (author) says: Mar 2, 2009. 2:18 PM
the numbers don't just go up by putting in another "one".

think of it this way, each column of numbers has a value(and the values go up by powers of 2). you can turn this value on and off depending on what number is on the column(1 = on and 0 = off)

so if there is a 1 in the "4" column then you add 4 of the value of the number.

if you want to get a number like 5 you need to have some "0's"in the middle of your number(IE. 101 = 5 because the 1 column is on and the 4 column is on, adding up to 5)

you just kept adding another "one" to your number in the next column which gives you the wrong numbers.
xilefakamot says: Sep 20, 2009. 6:03 AM
An easy way to remember how to write it is: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 The first (left) column goes: 0000000011111111 The second: 0000111100001111 The third: 0011001100110011 And the fourth: 0101010101010101 Hope this helps!
hg341 says: Feb 14, 2009. 6:11 PM
hey i like this but you have 16-20 all worng

1
01
11
001
101
011
111
0001
1001
0101
1101
0011
1011
0111
1111
00001
10001
01001
11001
00101

thats what you have it is really

00001=1
00010=2
00011=3
00100=4
00101=5
00110=6
00111=7
01000=8
01001=9
01010=10
01011=11
01100=12
01101=13
01110=14
01111=15
10000=16
10001=17
10010=18
10011=19
10100=20
10101=21
10110=22
10111=23
11000=24
11001=25
PhotoPeng says: Jan 1, 2008. 7:55 PM
0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 10000
dsman195276 (author) says: Jan 2, 2008. 5:33 AM
no its 0 1 01 11 001 101 011 111
octavian234 says: Jul 16, 2008. 9:40 PM
no its 011000010110001001100011
dsman195276 (author) says: Jul 17, 2008. 5:13 AM
...WHAT????
Derin says: Feb 7, 2009. 10:54 AM
all those codes equal Ü»ÄÕæ÷Ás_abc
technodude92 says: Feb 9, 2008. 10:36 PM
actually... your both right... in a sense. dsman1's MSB is on the left and PhotoPeng's MSB is on the right.

MSB is the Most Significant Bit, that is, the bit with the highest value. in decimal the "MSB" is always to the left. in the number 643, 6 is the most significent digit. in the binary form of 2, 10 the MSB is on the left. but 2 can also be written with MSB on the right, 01.
dsman195276 (author) says: Feb 10, 2008. 4:04 PM
interesting...
Baron A says: Feb 13, 2008. 8:05 AM
Just wonderin' did you copy and paste the info for this instructable? Cause, the spelling and grammer is spot on....? ( very curious)
dsman195276 (author) says: Feb 13, 2008. 12:12 PM
i typed the steps for it my self. bran typed the intro. see he is a collaborator.
Baron A says: Feb 14, 2008. 3:55 AM
Yes, the intro was propper grammer and spelling. BTW Good instructable!
dsman195276 (author) says: Feb 14, 2008. 12:08 PM
thanks, if you like this you should check out the next instructables i am going to post on editing simple hexdecimal codes for a action replay!
Baron A says: Feb 15, 2008. 3:54 AM
Cool, I will. ( when / if its published)
dsman195276 (author) says: Feb 15, 2008. 4:42 PM
dsman195276 (author) says: Feb 15, 2008. 12:10 PM
all i have to do is at some pics to the instructable and it will be done!
g12345389 says: Feb 2, 2008. 5:22 AM
is that why we see a bazillion numbers in the matrix?
dsman195276 (author) says: Feb 2, 2008. 7:34 AM
yea
g12345389 says: Feb 2, 2008. 5:23 AM
and is this biometric code?
dsman195276 (author) says: Feb 2, 2008. 7:35 AM
no its binary
Tobita says: Feb 25, 2008. 11:51 PM
lol, sounds like a wrong classroom case:P
cokebottle tuque says: Jan 1, 2008. 10:26 PM
Ya the least significant digit should be on the rite. If I write six hundred and thirty two as "236" every one would read it as two hundred and thirty six. Or to put it another way 1000s, 100s, 10s, 1s 8s, 4s, 2s, 1s
lieuwe says: Feb 9, 2008. 11:44 AM
it depends if its little-endian, the you're right, if its big-endian its exactly the opposite
 1-40 of 64 Next »