0100000101010011010000110100100101001001

It would be no surprise if I had decided to write this entire post in binary digits. In fact, I have been infatuated with binary for nearly six years. In June of 2014 (at a measly 13 years old), I read Code by Charles Petzold (2000), consisting of a hypothetical step-by-step guide to constructing a computer from the logic gates to the operating system. Impressed by Petzold’s simplification of an overwhelmingly complex device and his compelling narrative-like style, I could never seem to put the book down, having read it cover-to-cover nearly ten times as of now. It is what sparked my interest in electrical engineering, and I referenced it multiple times in my application essays for Schreyer. In essence, I am enrolled in this very course—and this very university—partly due to Petzold and his work.

Image Courtesy of Goodreads

Once I read Code, I was driven to learn more about the base-2 number system (binary), the quintessential facet of digital computing. I began by practicing binary-to-decimal conversion, the process of rendering a familiar base-10 number (e.g., 25) into its binary form (11001 in the case of 25). In the base-10 decimal system—taken for granted to such an extent that alternative systems seem almost inconceivable—each digit in a number (0-9) represents a multiple of a power of 10. This is illustrated below for the number 3851:

3581 = 3 x 10^3 + 5 x 10^2 + 8 x 10^1 + 1 x 10^0

In the binary system, with only two digits, each digit represents a power of two. Conceptually, each position can be regarded as being turned “on” (multiplied by 1) or “off” (multiplied by 0, or annihilated):

1001101 = 1 x 2^6 + 0 x 2^5 + 0 x 2^4 + 1 x 2^3 + 1 x 2^2 + 0 x 2^1 + 1 x 2^0

However, base-conversion arithmetic wound up becoming tedious and uninteresting, with little potential application beyond fundamental mathematical skill. I thus turned to pursuing a system touched on by Petzold but imperative to the operation of machines everywhere: text representation via the American Standard Code for Information Interchange (ASCII).

Before the ASCII table is presented, it is helpful to have knowledge of the hexadecimal (base-16) number system, consisting of the digits 0-9 and six additional “digits” signified by the letters A-F (representing 10 through 15, respectively).

Image Courtesy of String Functions

In a two-digit hexadecimal number, each digit (or nibble) can be expressed as a string of exactly four binary digits. Zero (0) is signified by 0000, F is signified by 1111, and intermediate conversions are displayed below:

Image Courtesy of Geeks for Geeks

The ASCII system consists of common English characters (e.g., alphanumerics, $, &, !, [space]) each represented by a two-digit hexadecimal—and consequently, 8-bit binary—code. Applying the terminology that 8 bits corresponds to one byte, it holds that ASCII represents each character as a single byte. That is, a word or expression made of n characters occupies n bytes of storage or memory. The complete ASCII table is shown below:

Image Courtesy of Wikimedia

One may immediately note that the table only displays the first half of the hexadecimal codes and excludes 80 through FF. Such secondary codes comprise the extended ASCII system, which consists of more obscure characters and is unique to each operating system (Windows or Mac). Moreover, the ASCII hexadecimal codes 00 through 31 can essentially be ignored (except 09 through 0F), as these are primarily applicable to archaic typewriters, the main writing tools at the time of ASCII’s inception. Using ASCII, my complete first name can be written as follows:

Hexadecimal:  416E746F6E696F

Binary: 01000001011011100111010001101111011011100110100101101111

In the comments section, please try expressing your name in hexadecimal or binary using the ASCII table! Additionally, there are myriad online “text to binary converters” at your disposal. Many programs (and, if you noticed above, Petzold on the front cover of Code) yield only 7 binary digits per character, as 8 are necessary only if extended ASCII is incorporated. However, to maintain evenness and the “one byte per character” standard, the convention is to annex a leading zero to represent a character with 8 bits.

In the next blog post, I will detail my endeavors to mathematically apply ASCII to formulate a code system, particularly in relation to my grandfather’s riddle and the supplementary curiosity with the number 9.

5 thoughts on “0100000101010011010000110100100101001001

  1. This is my name in binary code. 01000100 01100001 01110110 01101001 01100100 I think it is super cool how you use numbers in digital computing. While I think that this stuff is super complicated I am still interested in your blogs and as a result, I want to learn more about something I know so little about.

  2. not even gonna lie, I was so so so confused this time. I’m already so terrible at math haha… hexadecimal?? I really am so envious of you because I have no idea how to wrap my head around equations of this caliber. Maybe soon… next week can we have a simpler equation?

Leave a Reply

Your email address will not be published. Required fields are marked *