DEV Community

Maria Chukhajyan
Maria Chukhajyan

Posted on

Understanding Binary and Other Number Representations: A Freshman's Guide

Hey there, mates!
I'm Maria, a freshman student majoring in Computer Science at the American University of Armenia. I know that sometimes blogs can be tiring and difficult to understand, so I've decided to help you out and share the knowledge I've obtained during my first year of studies.
First of all, Binary numbers, I've heard about them even before entering the university, but what actually are they?

At its core, computers are based on binary digits. It is a base-2 number system with only two digits: zero and one. Isn't it fascinating how everything a computer does can be reduced down into just two numbers?

For Example:

Decimal (base-10): 2.
Binary (base-2): 10.
In binary, each location represents a power of two, similar to how decimal utilises powers of ten.

Why are these numbers termed binary?
The term "binary" comes from the Latin word "bini," which means "two by two" or "pair". In the binary system, just two digits are used: zero and one. This makes it a base-2 system (bi = 2). In a binary system, each number or piece of data is represented by two digit combinations.

Aside from binary, there are several additional number systems (used for various computer-related tasks) that you will face during your adventure in this sector, therefore I've decided to provide a brief overview for you.

Decimal (base-10): This is what we use in everyday situations. It consists of ten digits (0–9).
Octal (base 8): Octal, which is commonly used in computing, has eight digits (0-7). It is especially useful for representing huge binary integers in a more compact format.
Hexadecimal (base-16): This system has sixteen digits (0-9 and A-F, where A equals 10, B = 11, and so on). Hexadecimals (abbreviated hex) are commonly used in programming due to their ease of conversion between hex and binary formats.

Why is this important in Computer Science?

Understanding these number systems is critical because it enables us to think like computers. Whether you're working with low-level programming, memory management, or understanding how data is stored, binary and its siblings (octal and hexadecimal) will appear regularly.

Top comments (0)