Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Binary, hex, ,dec conversion tutorial.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Aug 30, 2007 6:34 pm    Post subject: Binary, hex, ,dec conversion tutorial. Reply with quote

Now I'm sure most people know how to do this, but I am doing this for people who dont. First off, binary is base 2, hex is base 16, and dec is base 10.

Binary = binary. Hex = hexadecimal Dec = Decimal.

Binary to Dec

I will take the binary value and give you the equivalent of dec.

Code:

0001 = 1


Now the way this was achieved is really simple. Since binary is base 2, the only numbers you have is 1 and 0. And each new column is to the next power. The first one is 2^0=1. The second is 2^1=2. The next is 2^2=4. And the last column is 2^3=8. And remeber, you go from right to left, so its 1 not 8.If you didn't understand all the ^'s just think about doubling the value of each column. Now you might understand it more and think about it this way.

Code:

8|4|2|1
-------
0 0 0 1

8*0=0
4*0=0
2*0=0
1*1=1

0+0+0+1=1


Now I will do something that might be a bit harder.

Code:
1101001


This may seem confusing to you because we only have used four columns and you might have thought there were only four, but there aren't. Others might have already guessed this in which case. I want you to now convert it and check your answer against mine.

Code:

64*1=64
32*1=32
16*0=0
8*1=8
4*0=0
2*0=0
1*1=1

64+32+0+8+0+0+1=105


If you got the answer 105 you are right, if not read over how to convert. Now here are some for you t do that range from hard to medium to easy.

Code:

100111001


Code:

0010110


Code:

1101


Hex To Dec

Well I will do the same hting I did as binary to dec. I will give a value in hex and do its equivalent in dec. And really you think the same way as you would in binary to dec. Just the column values are different since its base 16.

Code:

4C=76


And the reasoning behind that is this.

Code:


4 = 4*16=64
C = 12*1=12

64+12=76


Pretty simple. But there are 16 numbers and letters together you can use. 0123456789ABCDEF

A through F is 10-15. It was made like that for simplicity. Anyways, you might not have picked up the whole column value thing. So I'll help.
The first column(C) is 16^0=1. The second column(4) is 16^1=16. So if you think about it that way...

Code:

16|1
----
4  C

4=4*16=64
C=12*1=12

64+12 = 76

F
Now if your confused still by what I mean by the column value thing. It is really essentially values assigned to each digit column in a number that increased by the base to the next power. You then multiply that value by the digit in that column.

Now a harder one you can do and check the answer against mine.

Code:
FC4A8


Code:

F=15*65536=983040
C=12*4096=49152
4=4*256=1024
A=10*16=160
8=8*1=8

983040+49152+1024+160+8=1033384



If you got the answer 1033384 you are right, if not read over how to convert. Now here are some for you t do that range from hard to medium to easy.

Code:

008C10AB9


Code:

F79B0


Code:

A8


Binary to Hex

Sadly this part was decided to not be put on beacuse I had been waiting to put this part on for hours and by the time I got back to this post I was just too darn tired to do anything. So enjoy your unfinished tutorial Wink

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
fuzzy
Cheater
Reputation: 0

Joined: 28 Aug 2007
Posts: 28
Location: In an old women's boot

PostPosted: Thu Aug 30, 2007 6:45 pm    Post subject: Reply with quote

wao... it makes perfect sense!
_________________
IF QUIZES ARE QUIZICLE THEN WHAT ARE TESTS?
btw my avatar is ment to be a joke >_>


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites