levo

Data Representation and Data Types

Primitive data types and storage requirements

  • 3 things to know
  • AS Unit 1

Overview

Primitive data type, range of a sixteen-bit signed integer and range of an eight-bit unsigned integer.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

What is a primitive data type?

Key term

What does the real type hold, and how is it stored?

Key term

Why use an integer rather than a real whenever the data allows it?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is a primitive data type?

    Model answer

    A primitive data type is one of the basic types built into a language, out of which larger structures such as arrays and records are assembled.

  2. 2

    What values can a Boolean hold, and how much space does it take?

    Model answer

    It holds only true or false, which needs one bit in principle, but it is usually given a whole byte because a byte is the smallest unit that can be addressed.

  3. 3

    What does the character type hold, and how much space does it need?

    Model answer

    It holds one symbol stored as its code, taking one byte under extended ASCII, or between one and four bytes under UTF-8 depending on the character.

  4. 4

    How is a string stored, and what determines its size?

    Model answer

    A string is stored as a sequence of character codes, and its size is the total for those characters plus a small overhead holding either a length count or an end marker, so it varies with how many characters it holds.

  5. 5

    What does the integer type hold, and how much space is typical?

    Model answer

    It holds a whole number, which may be positive or negative, and it is commonly given two or four bytes.

  6. 6

    What does the real type hold, and how is it stored?

    Model answer

    It holds a number that may have a fractional part, and it is stored in two pieces, a mantissa carrying the significant digits and an exponent giving the scale, usually in four or eight bytes altogether.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

Fetch, , execute.
decodecompilestore

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AEncryption is reversible.
BThe stored form could be decrypted.
CA hash cannot be reversed.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Data Representation and Data Types, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.