Binary in Computer Science: It's Literally Just 1s and 0s

Binary in Computer Science: It's Literally Just 1s and 0s

Binary has excellent PR.

Look at this:

1011010010110101

Very technical. Very hacker. Very I definitely know what I'm doing.

But binary is actually built on one ridiculously simple idea:

Is it ON or OFF?

That's basically it.

Computers use two states, which we represent as:

1 = ON
0 = OFF

Everything else is us making those two numbers look more intimidating than they really are.


So why only 0 and 1?

Inside computers are tiny electronic switches called transistors.

They can represent two states.

So instead of counting like we normally do:

0, 1, 2, 3, 4, 5...

computers work using combinations of:

0 and 1.

One individual 0 or 1 is called a bit.

And:

8 bits = 1 byte

So this:

01001101

is one byte.

Congratulations.

You've now read binary without anything exploding.


The only row you really need to understand

For an 8-bit binary number, we use these place values:

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

They double each time.

That's important.

But here's the part that makes binary much easier:

For every number, binary is basically asking:

Do I need this number?

If yes:

1

If no:

0

That's it.


Binary → denary

Let's try one.

10110010

Put it underneath our place values:

128 64 32 16 8 4 2 1
1 0 1 1 0 0 1 0

Take the numbers with a 1:

128 + 32 + 16 + 2

Which gives:

178

So:

10110010 = 178

The zeros?

Ignore them.

They weren't invited.


Your turn

No scrolling for the answer immediately.

Convert:

01010011

Remember:

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

Which values are switched on?

.

.

.

Still thinking?

Good.

.

.

.

64 + 16 + 2 + 1 = 83

So:

01010011 = 83

If you got 83, excellent.

If you didn't, your computer privileges have not been revoked.

Try another one.



Why does any of this matter?

Because computers use binary to represent data.

Numbers.

Text.

Images.

Sound.

Instructions.

That photo on your phone?

Binary underneath.

Your favourite song?

Binary underneath.

The message you just sent?

Also binary underneath.

Your computer has essentially built an entire personality out of yes/no decisions.


The 20-second binary test

If you can answer these, you're in decent shape:

Why do computers use binary?

Two states can be represented using 0 and 1.

What's one binary digit called?

A bit.

How many bits are in a byte?

8.

What are the 8-bit place values?

128 64 32 16 8 4 2 1

How do you convert binary to denary?

Add the place values containing a 1.

That's most of the scary bit gone.


Want the visual version beside you?

Lavenderbyte's Binary Numbers Computer Science Poster turns the key ideas into a visual reference for classrooms and revision.


Or explore more Computer Science revision resources covering data representation and other GCSE topics.

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.