Binary and ASCII

In this section, we want to better your understanding of binary numbers, which are fundamental in understanding the way computers represent information.

You are likely much more familiar with the decimal (base 10) number system; fortunately the binary (base 2) number system works in fundamentally the same way as decimal. After this section, you’ll also be prepared to encounter other number systems, such as hexadecimal, to be discussed later in the course.

One of the most common types of information that computers process is text. To translate numbers into text, computers use a character encoding standard called ASCII. Adopting ASCII as a universal standard enables computers to properly communicate and display more than just numeric symbols, enabling you to send texts, read online articles, use word processors, and more.

  • Videos

  • Notes

  • Shorts

  • Supplementary Resources

  • ASCII table

    • Now we can do more, by using ASCII, a standard that maps numbers to letters. For example, A is mapped to 65, B is 66, etc. Though bits can only store numbers, programs can translate those bits to letters for humans to easily read. Here is an ASCII table for the printable characters; note that the ASCII standard also encompasses some characters that are important for computers, but are not visually renderable.
  • Thought Questions

    • Are there things that cannot be represented using binary?
    • What are the impacts of ASCII and Unicode on the usage of technology internationally?
    • Think about the ASCII table, in particular some of the patterns in it. How might some of those patterns be helpful?
    • Why do we need ASCII at all? What problems might we face if we didn’t have it?
    • In most of our messages, are we using all of the characters in the ASCII table? What does this mean in terms of optimization?
    • ASCII was written as a 7-bit encoding scheme, but bytes are 8 bits. Why do you think that is? What do you think that might mean about other historical standards?
      • Note: A byte was not actually standardized as 8 bits until the 1990s! ASCII was written in 1963.