Binary numbers (1 or 0) represent on(1) or off(0).
Typically you work out binary like this:
256 128 64 32 16 8 4 2 1
If you have say a decimal number of 254, to work out the binary code you would use the system above to work it out. So,
256 128 64 32 16 8 4 2 1
0 1 1 1 1 1 1 1 0
The number that was given (254) is equated in the system above if you were to add up the numbers that have 1s underneath them.From there you can learn to translate binary into decimal, decimal into hexidecimal (not using binary,because hex is a whole other language base) which then goes onto C++ programming and all the rest.
If you're working out bigger numbers, for instance 3813, then you need to create a bigger system in order to work out the binary code so therefore you need to do this:
2048 1024 512 256 128 64 32 16 8 4 2 1
1 1 1 0 1 1 1 0 0 1 0 1
So this is your Binary Code for 3813:
1 1 1 0 1 1 1 0 0 1 0 1
If you want to be lazy you can just use your calculator on your computer. You need to switch the view to scientific which calculates binary, decimal, hex and octal. I suggest you make sure you understand binary code first before moving onto hex because the development between them can become very confusing.
0 comments