teach-ict.com logo

THE education site for computer science and ICT

1. Introduction

This section will introduce you to the primitive data types used in computing.

The word 'primitive' in this case does not mean 'simple' or 'basic' - it means these data types are fundamental in computer science and so you need to understand them and how to use them.

All data within a CPU is in binary form. For example, a 16 bit computer manipulates and stores 16 bit binary numbers like this

                           101011011010101

However, that binary number can be used to represent different data types. Declaring a certain data type within a program allows the computer to :-

  • Allocate the correct amount of memory to it.
  • Proscribe what kind of data manipulation it is allowed to carry out based on data type.
  • Spot programming errors when data types are mixed up e.g trying to use integer instead of floating point.

This section is complimented with separate section on integers and a section on floating point

 

image