Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Professor Fiel on Binary and Hex
#25
Well, it'd be a bit tough to go over all of binary arithmetic, but I guess it could be done.

TehMatt Wrote:Can't wait for the next session, Fiel. I feel like I learned a lot. Made a lot of stupid mistakes. I need some practice problems.

Using this I made a code, sortof. I represented all the letters of the alphabet as numbers, logically 1-26. I then used hexadecimal to represent the numbers and dropped the 0x prefixes which made it look like normal hex to me. Honestly, I have no idea what I am tlaking about but w/e. For example a was 1 or 0000 0001 or 01 and Z was 26 or 0001 1010 or 1A. I then used 00 to represent a space. Here are some phrases I wrote:

0D 01 14 14 00 09 13 00 03 0F 0F 0C
M..A...T..T.......I...S.......C..O..O..L

&

0A A5 13 14 00 10 12 01 03 14 09 03 05
J...U...S..T.......P...R..A..C..T...I...C...E

In line of keeping with how programming languages work, using "00" as a space would not be the best. Why? Because all strings in programming languages end with a null terminator.

So if the string were just "MATT", the computer would see the letters "M", "A", "T", "T", and then a null terminator ("\0") to signify the end of the string.

So what is used otherwise?

There's something called the ASCII table. This table ascribes a number with every possible strike on the keyboard. So when you type the letter "A", on the keyboard, the computer reads 65 (0x41) and prints that to the screen. You'll notice on the ASCII table that there is a value that corresponds with hitting the spacebar key which is 32 (0x20). It might be a good idea to familiarize yourself with this table to help you.
Reply


Messages In This Thread
Professor Fiel on Binary and Hex - by Russt - 2009-02-23, 04:28 AM
Professor Fiel on Binary and Hex - by Nikkey - 2009-02-23, 05:04 AM
Professor Fiel on Binary and Hex - by Serene - 2009-02-23, 05:07 AM
Professor Fiel on Binary and Hex - by JezzaRules - 2009-02-23, 05:16 AM
Professor Fiel on Binary and Hex - by Scaeva - 2009-02-23, 10:34 AM
Professor Fiel on Binary and Hex - by Fiel - 2009-02-23, 11:24 AM
Professor Fiel on Binary and Hex - by Dusk - 2009-02-23, 12:40 PM
Professor Fiel on Binary and Hex - by KaidaTan - 2009-02-23, 01:14 PM
Professor Fiel on Binary and Hex - by Shidoshi - 2009-02-23, 04:32 PM
Professor Fiel on Binary and Hex - by GummyBear - 2009-02-23, 08:19 PM
Professor Fiel on Binary and Hex - by chrome - 2009-02-23, 09:00 PM
Professor Fiel on Binary and Hex - by KajitiSouls - 2009-02-24, 12:32 AM
Professor Fiel on Binary and Hex - by Nikkey - 2009-02-24, 09:32 AM
Professor Fiel on Binary and Hex - by mizzblue - 2009-02-24, 09:54 AM
Professor Fiel on Binary and Hex - by KajitiSouls - 2009-02-24, 03:55 PM
Professor Fiel on Binary and Hex - by xLeviathan - 2009-02-24, 04:29 PM
Professor Fiel on Binary and Hex - by Mira - 2009-02-24, 04:37 PM
Professor Fiel on Binary and Hex - by Nikkey - 2009-02-24, 05:26 PM
Professor Fiel on Binary and Hex - by Berzerk - 2009-02-24, 10:13 PM
Professor Fiel on Binary and Hex - by Takebacker - 2009-02-25, 01:20 AM
Professor Fiel on Binary and Hex - by Shidoshi - 2009-02-25, 01:39 AM
Professor Fiel on Binary and Hex - by Hazzy - 2009-02-25, 01:56 AM
Professor Fiel on Binary and Hex - by Cancambo - 2009-02-25, 02:00 AM
Professor Fiel on Binary and Hex - by Nekonecat - 2009-02-25, 01:52 PM
Professor Fiel on Binary and Hex - by Fiel - 2009-02-25, 02:07 PM
Professor Fiel on Binary and Hex - by KajitiSouls - 2009-02-25, 04:48 PM
Professor Fiel on Binary and Hex - by Cancambo - 2009-02-25, 05:32 PM
Professor Fiel on Binary and Hex - by Nikkey - 2009-02-25, 05:54 PM

Forum Jump:


Users browsing this thread: