DEV Community

Cover image for Basics of Binary Code in Computer Science
Lukas Mills
Lukas Mills

Posted on • Edited on

Basics of Binary Code in Computer Science

What is Binary Code?

For humans, we are able to communicate with one another through our wide range of 7,000+ languages in the world, but the way in which computers communicate to one another is through Binary Code. Any time you go to watch a movie, listen to music, or look up directions, you are giving your device input, and it turns into Binary Code. Binary Code is made up of 2 digits 0's, and 1's, unlike our traditional decimal system that is made up of 10 digits. The 0's and 1's are how computers read, process, and store data. These 0's and 1's can represent any symbol, letter, number, or segment of data. Binary Code can also be broken down further into what is called and Byte, and a Bit.

Bit

John Tukey, a leading statistician and adviser to five presidents first coined the term in 1946. A single bit is made up of a single 1 or 0. Computers are often classified by the number of bits they can process at one time. Graphics are often described by the number of bits used to represent each pixel, and a certain number of bytes makes up a larger unit called a KiloByte, MegaByte, GigaByte, or a TeraByte.

byte chart

Byte

A byte is a unit of storage capable of holding a single character for example those letters, numbers, and symbols, we talked about earlier. One byte is equal to 8 bits (a single 1 or 0)

Byte: This is a single byte composed of 8 bits => 01100011 = "c"
Enter fullscreen mode Exit fullscreen mode

Now what if we wanted to used multiple bytes to compose a word or sentence?

The Alphabet Using Binary

Binary Alphabet

A word using Binary

cat binary

Finally A Sentence Using Binary

ice cream binary

This gets very long winded, because a single byte doesn't represent one word, it only represents a single character, which is why us humans don't use this as a form of language, but this binary system is what computers use everyday to communicate!

Top comments (0)