Unit 3 - Data representation Flashcards
What are whole numbers?
Any positive or negative whole numbers are called integers.
What are rational numbers?
Rational numbers (ℚ) include values that can be expressed as fractions or ratios.
What are irrational numbers?
Some numbers cannot be expressed exactly as a fraction.
The decimal values of these numbers are endless.
Examples of these irrational numbers are √2 or pi.
What are real numbers?
If a number is either rational, (an integer or a fraction) or irrational, it is considered to be areal number ℝ.
What are ordinal numbers?
Numbers can be used to describe the position in which values appear.
For example, in an ordered list of names.
What digits does the binary number system use?
The binary number system uses only two digits: 0 and 1.
What is the decimal number system?
The decimal number system uses a combination of just ten symbols to represent any number.
Number systems are referred to by their base; that is, the number of symbols used to construct values.
Decimal is base 10 and the base may be referred to as a subscript.
What base do binary numbers use?
Base 2
What base is hexadecimal?
Base 16
Why do we use hexadecimal?
A hexadecimal value is much easier to read and remember than a string of binary digits.
It is quicker to write or type, since a hex digit takes up only one character, not four.
There is less chance of making an error when typing hex characters than a string of 1s and 0s.
It is used to define colours, in MAC addresses, in assembly languages and machine code.
It is very easy to convert to and from binary.
What is a positive and negative of using decimal numbers?
Decimal numbers are easy to understand but they are not easy to use in electronics.
What is a positive and negative of using binary?
Binary is simple to use with circuitry but is difficult to read by humans.
What are binary digits?
Each individual digit in a binary value is referred to as a bit, (from the term binary digit).
In a computer we can represent binary values by using ON and OFF voltage signals for each individual bit.
For n bits a computer can produce 2n different combinations of values.
What are number prefixes?
When dealing with large quantities it is more convenient to summarise this using number prefixes
A common example of this is the kilogram k which is equivalent to 1000 grams.
What is a kibi?
KiB - 2^10 = 1,024 bytes.
What is a mebi?
MiB - 2^20 = 1,048,576
What is a gibi?
GiB - 2^30 = 1,073,741,824
What is a tebi?
TiB - 2^40 = 1,099,511,627,776
What is ASCII?
In 1963 the American Standard Code for Information Interchange, (ASCII,) was established to encode symbols found in the English alphabet
It was composed of a 7 bit character set giving 27 (128) possible binary codes.
What is unicode?
The Unicode system was introduced to standardise the encoding of characters from all languages
Unicode can apply a variable length encoding of either 16 bits or 32 bits
In order to improve adoption of this new standard the first 128 Unicode characters were set to be the same as the ASCII character set.
What can cause transmission errors?
Electrical interference
Power surges
Synchronisation issues
Wear and tear on the cable or connectors
What can transmission errors do to bits?
These errors can cause bits to flip from 1s to 0s and 0s to 1s.
What are techniques that can be used to check for errors in transmission?
Parity bits
Majority voting
Check digits
Checksums
What happens when a transmission error is detected?
The data cannot be corrected
A request to resend the data is invoked.
What is a parity bit?
Computers use either odd or even parity
When sending a byte of data, one bit is used as a parity bit
This bit is set to a 1 or 0 to make the total number of 1s or 0s in the byte (including the parity bit) odd or even depending on the machine.
For example:
0101010 odd parity would be 0 because then there’s 3 1s. even parity would be 1 because then there’s 4 1s.
How can parity be used for error detection?
When data is transmitted, the parity bit is set at the transmitting end and parity is checked at the receiving end
If the wrong number of bits are ‘on’, an error has occurred
The receiving computer notifies the transmitting end and the data is resent
What is majority voting?
Each bit of a message is sent three times.
If a bit value is flipped erroneously the recipient computer uses the majority rule and assumes that the two bits that have not changed were therefore correct.
What is a check digit?
A check digit is an additional digit at the end of a string of other numbers designed to check for mistakes in input or transmission.
The first 12 digits of the barcode are the unique item number, the 13th is the check digit calculated by an algorithm based on the other 12 digits
What is a checksum?
A checksum works in a similar way to a check digit
A total sum of all bytes in a transmission of data is calculated using an algorithm
The sum is often sent with the data
The receiving computer recalculates the checksum based on the data it received and compares it with the checksum received or a known, expected value
If it does not match, the data may have been altered or corrupted during transmission and the data is resent.