Introduction:-
Well I like to make things manually! Why? Because that gains me more knowledge! In this tutorial we will go low-level and I will explain how to convert Binary, Decimal and Hex! might seem useless but it is NOT! but you can always impress your friendsyou will know more about the actual Pc background!
NOTE:- IF YOU WANT TO FULLY UNDERSTAND THIS YOU WILL NEED SOME GOOD BACKGROUND OF THESE THINGS!!
Let's Start:-
First of all you will need to know some basic things about Binary. Decimal and Hex digits
Binary:- Contains only 1's and 0's as digitals
Decimal:- Contains any whole numbers ( 9, 255, 15265789 anything! as long as it is whole )
Hex:- Contains 0-9 and then A to F ( A to F represent 10 to 15 )
Converting Binary to Decimal:-
So lets say you have this binary number 11101, what does that mean in Decimal?
Here is how
So we make like this:-
Now where there is a one (1) in the binary number we add the top number that is representing it so here we have a 1 under the numbers 16, 8, 4, 1Code:16 8 4 2 1 <-- We duplicate the number 1 1 1 0 1 <-- Binary number
So we add that number and ignore the other numbers that under them is a 0 so we make
16+8+4+1=29
So the binary number 11101 in Decimal ( numbers that we understand ) it means 29!
Converting Decimal to Binary:-
This is the opposite but it has a different method to do it! we will take the previous number (29) so to proof that this works
We will take the number 29 and divide it by 2 until the answer reaches 0 and where there is a remainder we write one (1) where there is no remainder we write zero (0)
and we write the number from bottom to top so it reads 11101 huh? the number matches with the previous method of Binary to Decimal!
Converting Binary to Hex:-
Now we will take the number 11101
Here we will have to divide the Binary into 4-Bit numbers
Answer is 1 and ( 8+4+1 ) we add the numbers where there is 1Code:1 | 8 4 2 1 <-- Here we have 4-Bits and 1-Bit ( doubling the number ) 1 1 1 0 1 <-- Binary Number
so its 1 and 13
so in HEX its 1C ( because A =10, B=12, C=13, D=14, F=15 and it stops )
Converting Hex to Binary
Lets say we have this Hex Number
A4
We know that A=10
so we make
** = We make 1 under those numbers that add up to the number on top of them for example 8+2 make 10 so we make 1 under the 8 and 2 and 0's under the others! So A4 in Binary is 10100100Code:A 4 <-- Hex 10 4 8 4 2 1 | 8 4 2 1 <-- 4-Bit Number 1 0 1 0 | 0 1 0 0 <-- **
Converting Hex to Decimal:-
Here we will have to convert the HEX into Binary ( as shown previously ) and then make:-
and we add the numbers that have 1 under them so its 128+32+4=164Code:128 64 32 16 8 4 2 1 <-- We double the number 1 0 1 0 0 1 0 0 <-- Write the Binary Number
so A4 in Decimal means 164!
Converting Decimal to Hex
Here we made like normal Decimal to Binary now we have to add
And normal Binary to Hex!
Conclusion:-
Well it's a long tutorial and it's too complicated I know but well can't be better! hope this helps!
C'mon man, This is mathematics and I have done this at school a lot of times, But I never knew the Hex. its 15, wow!.
Hey, I study in school in sinhalese and I never knew the word HEX, that's all. But I knew these number stuff very well. Very simple mathematics they are.
You can use that process for any base. Babylonians used base 60. Mayans used a variation on base 20.
Why do you all mess up with these conversion stuff, rather just using a simple calculator? I navigate you guys to step-in to VB Tutorials to check my basic calculator tutorial.
Umm I like to make things manual as that would increase my knowledge!
Most calculators won't do ternary.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks