Jayce
Fully Optimized
- Messages
- 3,056
- Location
- /home/jason
Long story short... we were shown like 2 examples of how to code in binary and that was that. I thought I was doing it right... we were supposed to code our full name and turn it in to the instructor. But when I looked up a binary/ascii chart online and compared it to what I got, mine were completely wrong. I don't know what I did wrong.
Let me try my best to explain how I did what I did.
Let's say I'm using the ASCII number 74, which I believe is capital J. First I'd set up my chart like this...
1024 512 256 128 64 32 16 8 4 2 1
Then using that chart, I'd basically see what adds up to 74, going from left to right. For example, for 74 I'd do the following, putting a 0 under every number it DIDN'T work out with, and a 1 under every number it DID work out with.
1024 512 256 128 64 32 16 8 4 2 1
0 0 0 0 1
Okay, I'm at 64 now. So I'd take 74 - 64 and get 10. So the remaining code has to somehow add up to 10.
1024 512 256 128 64 32 16 8 4 2 1
0 0 0 0 1 0 0 1 0 1 0
So my results got this:
00001001010
But, that's wrong. Because on this ASCII Binary chart I found online here, the actual binary code for it is:
01001010
Oh wow, I just realized my binary code is right except mine is 3 digits more, including the 0's on the left side.
Can anyone shed some light on this? I'm confusing myself more and more so I'm going to stop here. Was I on the right track?
Let me try my best to explain how I did what I did.
Let's say I'm using the ASCII number 74, which I believe is capital J. First I'd set up my chart like this...
1024 512 256 128 64 32 16 8 4 2 1
Then using that chart, I'd basically see what adds up to 74, going from left to right. For example, for 74 I'd do the following, putting a 0 under every number it DIDN'T work out with, and a 1 under every number it DID work out with.
1024 512 256 128 64 32 16 8 4 2 1
0 0 0 0 1
Okay, I'm at 64 now. So I'd take 74 - 64 and get 10. So the remaining code has to somehow add up to 10.
1024 512 256 128 64 32 16 8 4 2 1
0 0 0 0 1 0 0 1 0 1 0
So my results got this:
00001001010
But, that's wrong. Because on this ASCII Binary chart I found online here, the actual binary code for it is:
01001010
Oh wow, I just realized my binary code is right except mine is 3 digits more, including the 0's on the left side.
Can anyone shed some light on this? I'm confusing myself more and more so I'm going to stop here. Was I on the right track?