Data Representation Flashcards
(101 cards)
What are natural numbers?
Natural numbers are position-only integers: N = {0, 1, 2, 3…}
What are integers?
Integers are numbers that can be expressed without a decimal component. These are inclusive of negative numbers and zero: Z = {….., -2, -1, 0, 1, 2…}
What are rational numbers?
Rational numbers are those that can be expressed as a fraction. This means that all integers are rational numbers. Q = {… 0.5, 1, 1.5…}
What are irrational numbers?
Irrational numbers are those that cannot be written as a fraction.
What are real numbers?
Real numbers encompass all of the numbers sets as a set of all possible real-world quantities.
R = {N, Z, Q}
What are ordinal numbers?
Ordinal numbers are numerical values that hold the position of an object when it is placed in an order.
What is decimal?
Denary is represented using powers of 10 for each position of the number. It has the radix of 10.
What is binary?
Binary representations are made up of groups of bits to convey a value using a series of 1s and 0s. Binary is represented as powers of 2.
What is hexadecimal?
This system uses 16 digits, there are only ten symbols in the denary number system (0-9) and a further six symbols (A-F) are used to represent the remaining six digits . It uses less memory to store more numbers- 256 numbers in two digits whereas decimal number 100 numbers in two digits;
Why is hexadecimal used as a shorthand for binary?
The main reason for this is that long sequences of binary digits are hard to read and understand for humans. For example, to represent 256 in binary it is 100000000 but in hexadecimal it is 100.
Converting binary to denary
Just add up place values
Converting denary to binary
Keep dividing by 2.
145/2 = 72 R 1
72/2 = 36 R 0
36/2 = 18 R 0
18/2 = 9 R 0
9/2 = 4 R 1
4/2 = 2 R 0
2/2 = 1 R 0
1/2 = 0 R 1
= 10010001 (2)
Converting binary to hexadecimal
Split it:
00101111
1) 0010(2) = 2(10) = 2(16)
2) 1111(2) = 15(10) = F(16)
= 2F(16)
Converting hexadecimal to binary
Find the equivalent denary number for each of the hex digit then convert those into binary.
FA
F = 15 = 1111
A = 10 = 1010
= 11111010(2)
Converting denary to hexadecimal
- Divide denary number by 16 and write down the result and the remainder
- Repeat the division until you get a result of 0
- Convert the denary remainders to their hex equivalent
- Write the remainders in reverse
For 125:
125/16 = 7 R13
7/16 = 0 R 7
13 = D, 7 = 7
7D(16)
Converting hexadecimal to denary
- Separate the hex digits and find their equivalent denary values
- Use the hexadecimal place vales table to multiply each value
- Add the results of the multiplications together
F8(16)
- F = 15, 8 = 8
1516 = 240
81 = 8
F8 = 240+8 = 248(10)
What is a bit?
A bit is the most basic unit of the data representation used in computer systems and conveys the state of 1 or 0.
What is a byte?
A byte is 8 bits and it represents the small unit of addressable memory
What is a nibble?
A nibble is 4 bits.
What are words?
Words are groups of bytes in a sequence.
What is a Kilobyte?
10^3 bytes
What is a Megabyte?
10^6 bytes
What is a Gigabyte?
10^9 bytes
What is a Terabyte?
10^12 bytes