What type of data can only take one of two values, typically TRUE or FALSE?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Study for the OCR GCSE Computer Science Exam. Prepare with flashcards, multiple choice questions, and hints. Get exam-ready with practical questions and answers!

The correct answer is Boolean because this data type is specifically designed to represent one of two possible values: TRUE or FALSE. Booleans are essential in computer science and programming, particularly in decision-making processes and conditions, such as in if-statements and loops.

In contrast, strings are used to represent sequences of characters, such as words or sentences, and can take on a wide range of values beyond just two. Real numbers represent continuous values or decimal numbers, which can also encompass a vast range of possibilities. Integers are whole numbers that can be positive, negative, or zero, again allowing for many values rather than just two. Thus, Boolean is unique in its restriction to only two discrete values, making it the appropriate choice in this context.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy