3. data representation Flashcards
natural number
is a whole number used in counting
rational number
any value that can be expressed as a ratio, or fraction. this includes integer values since each can be simply expressed as 7/1 or 1076/1.
irrational number
such as pi cannot be expressed as a fraction and which has an endless series of non-repeating digits.
ordinal numbers
natural numbers used to describe the numerical position or order of objects: first in race, second turn on the left.
they are used as pointers to a particular element in a sequence, or to define the position of something in a list, for example an array pointer.
characters and integers are examples of ordinal data types.
number bases
binary - a number system that only use digits 1s and 0s and has a base 2.
denary - a number system that uses the digits 0 through 9 and has a base 10.
hexadecimal - a system that uses digits 0-9 and letters A to F and has a base of 16.
why is the hexadecimal number system used?
- its easier for humans to understand and write
- fewer mistakes are likely to be made in writing
- simple to represent a byte in just two digits
- easier to remember than a 24-bit binary string (as colour codes in images often use hexadecimal to represent the RGB values)
byte
8 bits
bit
a binary digit used by computers as the fundamental unit of information
signed binary
a binary number system that can represent both positive and negative numbers
unsigned binary
a binary number system that can only represent positive numbers
ASCII (american standard code for information interchange)
a character set used to represent alphanumeric characters or symbols as set of 7 bits.
ASCII information
1st 32 codes represent non-printing characters used for control such as backspace (code 8), enter or carriage return key (code 13) and the escape key (code 27).
space character is also included as code 32 and delete as 127
unicode
- a character set that is a superset of ASCII. its used to represent alphanumeric characters or symbols as an integer code point which is equal tot he characters ASCII code
- 8 bit version was developed to include an additional 128 combinations to represent symbols (page 74 tb)
unicode information
encodings take more storage space than ASCII, significantly increasing the file sizes and transmission times.
parity bits
a method of checking binary codes for errors during data transmission by counting the numbers 1s and 0s present
majority voting
a method of checking binary codes for errors during data transmission by sending each bit multiple times
check digits
a method of checking codes for errors during data transmission by adding an extra digit to the end (usually calculated/processed from digits in the code itself) that checks whether the data is accurate
checksum
is a mathematical algorithm that us applied to a ‘unit’ or packet of data
fixed point form
a form used to represent numbers with a fractional part in any number system.
fixed point binary numbers
useful way to represent fractions in binary
binary point
is used to separate the whole place values from the fractional part on a number line
twos complement
a coding scheme used in signed binary to represent negative as well as positive numbers. a negative number is represented by flipping all its digits and adding 1 to the most significant bit.