Uni-Sine
Computer ScienceCourses

Binary, Hexadecimal & Decimal: learn number systems

Binary, Hexadecimal & Decimal is an interactive course to learn binary and hex from scratch. Its 24 short sections cover place value, converting between binary, decimal and hexadecimal in every direction, bits, nibbles and bytes, binary addition, overflow and hex colour codes, with a converter, animation or practice question in every one.

Computers store everything as 0s and 1s. Binary is how they count, and hexadecimal is the shorthand people use to write binary without getting lost in long strings of digits.

What the course covers

SectionsTopicWhat you do
1 to 4Bits, place value and binary to decimalFlip eight bit switches and watch the value change, then convert binary to decimal
5 to 7Counting in binary, and bits, nibbles and bytesWatch binary and decimal counters roll over together, then sort numbers by how many bits they need
8 to 9Decimal to binaryConvert a number place by place, then do one yourself
10 to 14Hexadecimal: hex to decimal and backStep through 0 to F, then convert two-digit hex numbers both ways
15 to 16Binary and hex by nibblesSplit a byte into two nibbles and match each to its hex digit
17 to 20Binary addition and overflowAdd in columns with carries, then see what a 4-bit register holds when a sum is too big
21 to 22Hex colour codesMix red, green and blue from 0 to 255 and read the hex code
23 to 24Where each base is used, and mixed conversionsConvert one value into the other two bases

Binary and decimal

Every number system works by place value. In decimal each place is worth 10 times the one to its right; in binary each place is worth 2 times, so a byte's places are 128, 64, 32, 16, 8, 4, 2 and 1. Converting is adding the places with a 1 in them, and going back is fitting the biggest place value you can, writing 1 and subtracting, then moving right.

Hexadecimal

Hex is base 16, using 0 to 9 and then A to F for 10 to 15. One hex digit is exactly four bits, a nibble, so any byte is two hex digits: split it in half and convert each half. That is why hex appears in colour codes such as #FF8800, memory addresses and error codes.

Doing arithmetic

Binary addition works like column addition, except 1 + 1 makes 10, so you write 0 and carry 1. If the answer needs more bits than the computer has room for, the extra carry is lost, which is called an overflow error.

Try a question from the course

To turn binary into decimal, write the place values over the bits and add the ones under a 1. Take 11010110: its 1s sit under 128, 64, 16, 4 and 2, which add up to 214.

Now convert a new binary number, then press Mark to check your answer in the course.

Type the decimal value of a random 4 to 8 bit number.

Press Mark to have your answer marked in the Binary, Hexadecimal & Decimal course.

Who this course is for

  • GCSE and other secondary computing students revising binary, hex, conversions, binary addition and overflow.
  • Beginner programmers who keep meeting hex in colour codes, memory addresses and file formats.
  • Anyone curious about how a computer can store numbers, text and colours with only two symbols.

What you need to know first

Just everyday arithmetic: adding, subtracting and doubling. The course starts by looking again at how ordinary decimal place value works, then builds binary on top of it.

How long it takes

There are 24 sections, and most take a few minutes. Practice questions use random numbers, so you can repeat them until conversions are quick. Learners without a plan can open two sections of a course a day, in order, so the whole course takes 12 days. A plan removes the daily limit and lets you go straight to any topic, such as hex or overflow.

Interactive calculatorNumber Base ConverterConvert between binary, hex and decimal and add in binary, to check your answers as you practise.
Guided coursePC ComponentsSee where binary goes next: how the CPU, RAM and storage hold and move all those bits.

Common questions

Is this binary course free?
You can take every section without paying, two sections a day, in order. A plan removes the daily limit and opens any section straight away.
How do you learn binary quickly?
Learn the place values 128, 64, 32, 16, 8, 4, 2, 1 by heart, then practise converting a few numbers each day both ways. Hex becomes easy once you can turn any four bits into a number from 0 to 15.
Why do computers use binary?
Their circuits are made of switches that are either on or off, so two symbols, 1 and 0, are the most reliable way to store and move data.
Why use hexadecimal?
One hex digit replaces a group of four bits, which turns long binary numbers into short, readable ones. A byte such as 11111111 is just FF.
What is the largest number in 8 bits?
255, written 11111111. Eight bits give 2⁸ = 256 different patterns, from 0 to 255.
What is an overflow error?
When the answer to a sum needs more bits than there is room for. The top carry drops off, leaving a wrong value in storage.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Number Base Converter

    Convert between binary, hex and decimal and add in binary

    Open the tool
  • Learn it

    Binary, Hexadecimal & Decimal

    How computers count, and how to convert between number systems

    Start the course
  • Test it

    GCSE Computer Science

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Computer Science · Data and logicBinary calculator: convert and add binary numbersConvert binary to decimal, hex and octal and back, and add binary numbers with the carries shown, with the working and examples to check.