How to Count in the Binary and Hexadecimal Numbering Systems

59,571

25

64

Introduction: How to Count in the Binary and Hexadecimal Numbering Systems

Just your average K'Nexer/Programer/Nintendo DS fanatic. Any questions you would like to ask abou...

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.

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.

Step 2: Binary

binary in the hardest to comprehend. it uses ones and zeros to repesent numbers. here are the numbers 1-20 in binary.

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

all the ones and zeros repesent powers of 2. the first one = 1.the second one = 2. the third one = 4 , and so on and so on.
so 3 = 11 in binary. because 1+2 = 3

for somthing cool to do with binary code look here.

https://www.instructables.com/id/Binary-Marble-Clock/
https://www.instructables.com/id/Build-a-binary-heart-decoration-Blinkenheart/

Share

    Recommendations

    • Creative Misuse Contest

      Creative Misuse Contest
    • Metalworking Contest

      Metalworking Contest
    • Tiny Home Contest

      Tiny Home Contest

    64 Discussions

    I mean this: ....................../´¯/) ....................,/¯../ .................../..../ ............./´¯/'...'/´¯¯`·¸ ........../'/.../..../......./¨¯\ ........('(...´...´.... ¯~/'...') .........\.................'...../ ..........''...\.......... _.·´ ............\..............( ..............\.............\...

    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[H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MMMMMMMMML7^LMMMLMLLLLLLPD^:zPDQQQPLLLLL^3 [/[@MMMMM MMMD[//////&N9JzzQDDDPPLLLLLLzDMMMMMMMMMMMMMMMMMMMMMMMMDLMMMLLLLLLLLLLPp_EQQQDPLLLL9#9z /[^MMMMM MMM9[//////\W7EJzzQDDDPPPLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMLLLLLLLLLLPDQQQQDLLLLz:@Dzd[[xMMMMM MMMp////////^N7EJzzQDDDPPPPLLLLLMMMMMMMMMMMMMMLMMMMMMMMMMMMLLLLLLLLLLLPPDDQQQDLLLp pPDz_/[\LMMMM MMM&////////[HN7EJzzQQQDDPPPPPLLLLLMMMMMMMMMMMLMMMMMMMMMMLLLLLLLLLLLLPPDQQzzQDLLLDPPDE [/[#QMMMM MMMx/////////[@W79EJJzW7QQQQDDDPLLLLLLMMMMLLLLLMMMLLLLLLLLLLPPPPPPPPPDDQzJJ&JHDPLLPQH#////[JMMMM MMP#//////////[ 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

    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).

    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 :)

    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.

    00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01010 i give up... i can count in binary but it takes me ages...

    1 reply

    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

    3 replies

    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.

     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...

    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.

    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!

    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

    0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 10000