How to Count in the Binary and Hexadecimal Numbering Systems

57,432

25

64

Posted

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

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

  • First Time Author Contest 2018

    First Time Author Contest 2018
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Gluten Free Challenge

    Gluten Free Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

64 Comments

Lol, If you count to 5 in binary on your hands...

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 //////[WMM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LLLLLLdpLMMMMMMMMMMMMMMMMMMMMML7^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

And that is? I am not fluent in jiberishese.

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

WOW *views link* oh, I get it now. lol, thanks!