GCSE · Computer Science · Eduqas · Spec C500QS

Boolean data type

Is the torch on? Yes or no. That tiny question hides a decision every programmer makes: what kind of data is this, and how should the computer store it?

Computer Science · Data types

Boolean or not?

For each item of program data, ask one question: could it ever be anything other than one of two states? Pick the item, then pick where it belongs.

Still to sort

Suits Boolean (0)

Can only ever be in one of two states.

Where the line is: If it can only ever be in one of two states, it suits Boolean. A third state, or a free choice of answers, takes it out.

Needs a different data type (0)

Can be in more than two states, or can be anything.

Where the line is: A third answer, or typed text that could be anything, means it is not two-state data, even if it sounds like yes or no.

8 of 8 still to sort.

Eight items from real programs. Commit to your call first, then read why.

Computer Science · Data types

What do you think a Boolean is?

A game asks the player: Do you want the music on? Three programmers each plan how to store the answer, and each of them is sure about the data type.

Which of these is closest to what you think about Boolean right now?
How sure are you?

Why data types matter

?

Reason it through

Why does it matter which data type you choose?

Link 1 of 3

First link · your turn

What does a data type tell the computer about a piece of data?

2
Locked — reveal the link above first
3
Locked — reveal the link above first

Computer Science · Data types

Run it and see what goes wrong

A game asks the player: Do you want sound on? The player answered yes. The program should print Sound on. Press Run and check what it prints against what you expect.

Python
  1. sound_on = "yes"
  2. if sound_on == True:
  3. print("Sound on")
  4. else:
  5. print("Sound off")

The messages and outputs are what Python 3.13 gives for this exact code.

Computer Science · Data types

Have a go: justify the data type

A shop's program records whether each customer has paid for their order. Name the most suitable data type for this item of data, explain why it is suitable, and say what can go wrong if an unsuitable data type is chosen. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Spot data that can only ever be one of two things, and store it as true or false.

What you need to know

  • A data type tells the computer what kind of data it is holding and what actions can be performed on it.
  • Boolean is one of the common data types programs use.
  • A Boolean holds one of only two values: true or false.
  • Have a goSam says a Boolean can hold true, false or maybe. Who is right: Sam, or the bullet you just read?

    The bullet. A Boolean holds only true or false. There is no maybe.

    Only two values exist, so a third answer simply cannot be stored in a Boolean.

  • Boolean is the suitable data type when an item of data can only ever be in one of two states.
  • The answer to a yes or no question is the classic case: yes is stored as true and no is stored as false.
  • Have a goA sign-up form has a tick box: Send me the newsletter. Does it suit Boolean? If so, what is a ticked box stored as?

    Yes, it suits Boolean. A ticked box is stored as true.

    The box can only ever be ticked or not ticked, and ticked is the yes case, so it is stored as true.

  • The word yes in speech marks is just text. The Boolean value is true.
  • If an item could ever be anything else, such as a third answer, it is not Boolean data.
  • Have a goPriya says: A student is present or absent, so attendance is Boolean. But her school also records late. Is she right?

    No. With late there are three states, so it is not Boolean data.

    Boolean suits data that can only ever be in one of two states, however two-way it sounds at first.

  • A program needs to know the data type so it can store and process the data correctly.
  • Using an incorrect data type can cause errors in a program.

The big picture

A Boolean is a data type that holds one of only two values: true or false. It is the suitable choice when an item of data can only ever be in one of two states, such as the answer to a yes or no question. Choosing an incorrect data type can cause errors in a program.

Key points

1A data type defines the kind of data a computer can store and the actions that can be performed on it.
2Boolean holds only true or false, and it suits data that can only ever be in one of two states.
3Yes to a yes or no question is stored as true, and no is stored as false.
4A program needs the correct data type to store and process data correctly, and an incorrect one can cause errors.

Worked example

Problem

A booking program lets a customer pick a delivery slot: morning, afternoon or evening. A programmer wants to store the choice as a Boolean. Decide whether that works.

⚠ Watch out

Treating anything that looks like yes or no as Boolean. The word yes typed as text is not a Boolean value, and an answer with a third option, such as yes, no or maybe, cannot be stored as a Boolean. A Boolean holds only true or false.

🧠

Memory hook

Two states, never a third. Ask: could it ever be anything else? If never, it is Boolean.

✓

Check yourself

Cover the page. Explain in your own words how you decide whether an item of data suits Boolean, then say what happens if you pick an incorrect data type.

Flashcards

(8)
What does a data type define?
The kind of data a computer can store, and the actions that can be performed on it.
How many values can the Boolean data type hold, and what are they?
Only two: true or false.
When is Boolean the suitable data type?
When an item of data can only ever be in one of two states.
How is the answer to a yes or no question stored as a Boolean?
Yes is stored as true and no is stored as false.
A reply can be yes, no or maybe. Why can it not be a Boolean?
It has three states, and a Boolean holds only two values.
Is the word yes, stored as text, a Boolean value?
No. Text is not a Boolean value. The only Boolean values are true and false.
Why does choosing the correct data type matter?
A program needs to know the data type so it can store and process the data correctly.
What can using an incorrect data type cause?
Errors in a program.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.