|
|
« Reply #1 on: March 03, 2015, 07:12:54 PM » |
|
Ultra-basic tutorial for how to work in hex: Open windows calculator Switch to programmer mode (alt+3) Then,
To convert hex into decimal: Go to hexidecimal mode Enter your hexidecimal number Switch to decimal mode
To convert decimal into hex: Go to decimal mode Enter your decimal number Switch to hexidecimal mode
Actual mathematical explanation for hex: In the decimal system (aka normal numbers) we write numbers as a combination of 0-9 in an order that represents how many powers of 10 those numbers should be multiplied by. So when you write 123 in decimal what you're actually expressing is 1*A^2+2*A^1+3*A^0 (where A here is a symbol representing what you'd normally call the number 10). Hexidecimal is very much like decimal, except instead of using 0-9 and powers of 10 you use 0-F (with A representing 10, B representing 11, etc, F representing 15). So if we were to write 123 in hexidecimal it would be 1*G^2+2*G^1+3*G^0 (with G representing what's normally called 16), or in decimal notation 1*16^2+2*16^1+3*16^0 = 1*256+2*16+3*1 = 291. Hexidecimal is used a lot in programming because two base 16 numbers fully represent a byte and 16 is close enough to 10 to neither require an absurd amount of space to write nor require an absurd number of extra symbols.
|