1.4.1 Data Types Flashcards
Primitive data types
One which is provided by a programming language
E.g, integer, real/float, Boolean, string
Integer
A whole number E.g, 0, 231, -67
Real/Float
A number decimal/fraction
E.g, 12.5, 0.0, -100.0001
Character
A letter number or special character
Boolean
A Boolean variable can only be TRUE or FALSE
String
Anything in quotation marks(single or double ‘…’ “…”)
Sign and Magnitude
Making the 128 bit the sign bit
00000011 = 3
10000011 = -3
Two’s complement
Write down the unsigned binary
Invert every bit
Add 1
Hexadecimal
16 figures
0-9 and A-F
Denary
A numerical system that uses 10 as its base
0-9
Floating point arithmetic
Allows very large numbers to be represented using the mantissa and the exponent
A Bit
A bit is the fundamental unit of information in the form 0 or 1
ASCII
American Standard Code for Information
Uses 7 bits which form 128 different bit combinations
UNICODE
A 16-bit code to represent all possible characters
Character sets
Groups of code that assign a character to a unique bit pattern