Right, I kinda need help with something. I understand the hexadecimals; until it gets to three digits... :( I'd like someone to explain it, thanks. :smileyface:
0xFF = 255
0x100 = 256
Use windows calculator until you figure it out. When I started 11 years ago I was in the same boat and that worked best for me.
Good luck.
I'll try but, judging on those numbers, I'll struggle quite a bit. Thanks for giving me the headstart though!
Start by learning to count in hex. That would help you. Most of us use a calculator (or some other tool) to convert between hex and decimal. Over time you'll memorize handfuls of frequent conversions without trying to.
I think I know a bit about hex. Last night I began writing all the hex's I could do. I managed to get to 9A, and the parts after that. I got a headstart using 'Statman Hexadecimals' (up to 20) and carried on from there. Once I finished, I checked my results to that page, they were all right!
What do you mean anyway by counting in Hex:
This?
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21...
And so on and so forth.
Quote from: doomkaiber001 on October 28, 2010, 05:40:38 PM
What do you mean anyway by counting in Hex:
This?
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21...
And so on and so forth.
Exactly this..
Oh, and sorry if that last post was a bit, well, hyper. I am happy though, beyond belief... Anyway I still don't understand how 0xFF equals 255. Enlighten me please?
Hex is a compressed form of binary.
0xF = 1111b
0xC = 1100b
(the lowercase b after a number indicates it is binary)
0xFF = 1111 1111b
Now you just need to learn how to convert base 2 to base 10.
http://www.wikihow.com/Convert-from-Binary-to-Decimal
So... Decimal to Binary
178= 10110010
Binary to decimal
11001110 = 206
So does that make 0xD 1101 and 0xE 1110?
Quote from: dcx2 on October 28, 2010, 07:34:17 PM
Hex is a compressed form of binary.
0xF = 1111b
0xC = 1100b
(the lowercase b after a number indicates it is binary)
0xFF = 1111 1111b
Now you just need to learn how to convert base 2 to base 10.
http://www.wikihow.com/Convert-from-Binary-to-Decimal
So I take it I need to understand Binary to work ot the Hex's following 9A?
Main thanks goes to Link because he said yes? ... *shrugs*
Those binary conversions are correct.
Example to convert straight to decimal from hex:
0x1FA =
(16^2)*1 + (16^1)*0xF + (16^0)*0xA =
256*1 + 16*15 + 1*10 =
256 + 240 + 10 =
506
Forgive me for this noobish question but what exactly does the ^ mean inbetween numbers.
"raised to the power of"
So ^2 means "squared"
16^4 = 16*16*16*16
Oh..! What a mistake. Now that you point it out to me it makes perfect sense... I'm going to try and find an answer to a different Hex.
I think I've got this wrong but;
0x2DA=
(16^2)*2 + (16^1)*0xD + (16^0)*0xA=
512 + 224 + 11 = 747
What do the values of the second number in the brackets rely on?
Windows / Mac calculators both have ability to switch from dec,hex,binary. You have to just switch the mode.
Could you check if the following is correct, please?
184 = 10111000
1011 = B
1000 = 8
0xB8
Quote from: doomkaiber001 on October 29, 2010, 01:32:40 PM
Could you check if the following is correct, please?
184 = 10111000
1011 = B
1000 = 8
0xB8
Correct.
Quote from: doomkaiber001 on October 29, 2010, 11:28:20 AM
What do the values of the second number in the brackets rely on?
The powers? They rely on the place of the digit. Counts up from 0 starting on the far right (1's place).
In 'normal' (decimal) math, you say there's a one's place, ten's place, hundred's place, thousand's place etc. (these are powers of 10)
In hex you'd say one's place, 16's place, 256's place, 4096's place etc. (these are powers of 16)
just change the view in your calculator as Nuke said:
(http://img149.imageshack.us/img149/517/calcl.png)
That's from Win 7 but it should be similar
I did this all in my head and on paper; thanks for telling me!
Anyway, if the decimal was between 257 and 512 , would it be 1x instead of 0x?
the 0x preceding a hex digit doesn't change. That's just to help people differentiate between different types of numbers
The numbers 0 - 255 can be represented by 2 Hex digits and in a rough speaking sense we call this 8bit (8 binary digits)
254 = 0xFE
255 = 0xFF
After FF we go into 16bit which is 4 Hex digits
256 = 0x100
257 = 0x101
...
9999 = 0x270F
then 32bit which is 8 Hex digits
350000000 = 0x14DC9380
and so on
someone else will do a far better job of explaining it
9999=
0010011100001111
0010 = 2
0111 = 7
0000 = 0
1111 = F
0x270F
350000000=
00010100110111001001001110000000
0001 = 1
0100 = 4
1101 = D
1100 = C
1001 = 9
0011 = 3
1000 = 8
0000 = 0
0x14DC9380
I used my head to work out most of this!
Quote from: doomkaiber001 on October 29, 2010, 04:29:06 PM
9999=
0010011100001111
0010 = 2
0111 = 7
0000 = 0
1111 = F
0x270F
350000000=
00010100110111001001001110000000
0001 = 1
0100 = 4
1101 = D
1100 = C
1001 = 9
0011 = 3
1000 = 8
0000 = 0
0x14DC9380
I used my head to work out most of this!
What do you think? :D
Hey James, I've got to say Thank-you. You've helped me all the way through this. You, dude, are amazing! And thanks to Panda on Smack (What kind of name is that anyway?!) for helping me just now.
If you converted 9999 and 350000000 to binary in your head or with a bit of scratch work; you're more dedicated than I am. lol
Like Panda said, it's just a way to show you that it's a different number base, 0x prefix means hex.
110 = decimal 110
0x110 = hex 110
110b = binary 110
edit: no problem =)
Now what to do. How about... I don't know.
its a common calculator way of writing exponents. he means to take the first number ^ to the power of (next number) so in the case of 100 you would have it done as 16^2 then go on for the rest of the numbers.
Ok... I think I get it. I find it easier to convert decimal to hex easier to do when I also use binary in the middle though. :)