|
|
TOPIC 1 | DATA REPRESENTATION
REVISION CARDS
'WE WISH YOU ALL THE BEST FOR YOUR EXAMS AND HOPE YOU FIND THESE REVISION CARDS USEFUL TO TEST YOURSELF'
REVISION CARDS
'WE WISH YOU ALL THE BEST FOR YOUR EXAMS AND HOPE YOU FIND THESE REVISION CARDS USEFUL TO TEST YOURSELF'
SECTION 1 | BINARY BASICS
WHY DO COMPUTERS USE BINARY TO REPRESENT ALL FORMS OF DATA
Computers use binary because it is easy to represent two states (on/off), and all data can be represented by combining these states. This allows for efficient processing and storage, as well as compatibility across different computer systems. Data is processed using logic gates and data is transferred within the computer as a series of electrical signals.
CONVERT BINARY 01010101 TO DECIMAL
ANSWER | 0+64+0+16+0+4+0+1= 85
CONVERT DECIMAL 196 TO BINARY
- Calculation: Divide 196 by 2, keep track of the remainders:
- 196/2 = 98,R0
- 98/2 = 49,R0
- 49/2 = 24,R1
- 24/2 = 12,R0
- 12/2 = 6,R0
- 6/2 = 3,R0
- 3/2 = 1,R1
- 1/2 = 0,R1
- Answer: Reading the remainders in reverse order gives 11000100
WHAT IS THE MAXIMUM NUMBER WE CAN REPRESENT WITH 16-BIT BINARY
Calculation | A 16-bit binary number can represent 2^16 values
Answer | The maximum number is 2^16 − 1 = 65,535
Answer | The maximum number is 2^16 − 1 = 65,535
IN BINARY WHAT ARE THE LEAST SIGNIFICANT BIT(S)?
Explanation | The least significant bit (LSB) is the bit with the lowest value position in a binary number, which is the rightmost bit. The bit on the right can only have a maximum value of one, all other bits can have a value higher than this therefore the bit on the right is the least significant.
Example | In the binary number 01010101, the LSB is the 1 on the right hand side of the number
Example | In the binary number 01010101, the LSB is the 1 on the right hand side of the number
SECTION 2 | OVERFLOW
WHAT IS OVERFLOW IN THE CONTEXT OF BINARY ADDITION?
Principle: Overflow occurs when the result of a binary addition exceeds the maximum number that can be stored in the given number of bits.
Example: Adding 1 to 11111111 in an 8-bit system.
Answer: The result is 100000000, which is 9 bits long and cannot be represented in an 8-bit register, causing overflow.
Example: Adding 1 to 11111111 in an 8-bit system.
Answer: The result is 100000000, which is 9 bits long and cannot be represented in an 8-bit register, causing overflow.
WHY DOES OVERFLOW OCCUR IN AN 8-BIT REGISTER AT VALUES GREATER THAN 255?
Principle: An 8-bit register can only represent numbers from 0 to 255.
Example: 11111111 in Binary is 255 in decimal
Answer: Anything greater than the representation of 255 in binary would require 9-bit binary. An attempt to represent more than 255 with just 8 bits would lead to an overflow.
Example: 11111111 in Binary is 255 in decimal
Answer: Anything greater than the representation of 255 in binary would require 9-bit binary. An attempt to represent more than 255 with just 8 bits would lead to an overflow.
WHY DO COMPUTERS HAVE PREDEFINED LIMITS FOR THE VALUES THEY CAN REPRESENT OR STORE?
Principle: Computers use a fixed number of bits to represent data, and each bit can only be a 0 or a 1. The number of bits determines the range of values that can be represented.
Example: A 16-bit computer can represent values from 0 to 65535.
Short Answer: A 16-bit computer has a predefined limit of 65535 for unsigned integers because it uses 16 bits to represent each number, and 65536(2^16−1) is the largest value that can be represented with 16 bits. If a calculation exceeds this value, it causes an overflow error, as the computer cannot store or represent a number larger than its maximum limit. Most modern computers use 64-bit.
Example: A 16-bit computer can represent values from 0 to 65535.
Short Answer: A 16-bit computer has a predefined limit of 65535 for unsigned integers because it uses 16 bits to represent each number, and 65536(2^16−1) is the largest value that can be represented with 16 bits. If a calculation exceeds this value, it causes an overflow error, as the computer cannot store or represent a number larger than its maximum limit. Most modern computers use 64-bit.
SECTION 3 | NEGATIVE NUMBER REPRESENTATION
WHAT IS TWO'S COMPLEMENT?
Principle: Two's complement is a method for representing positive and negative integers in binary form.
Example: Represent +5 and −5 in two's complement.
Answer: +5 is 00000101. −5 is 11111011.
Example: Represent +5 and −5 in two's complement.
Answer: +5 is 00000101. −5 is 11111011.
HOW DO YOU CONVERT A NEGATIVE INTEGER TO TWO'S COMPLEMENT?
Principle: Invert/Flip all bits of the positive binary value and then add 1 to the result.
Example: Find −18 in two's complement.
Answer: Invert (positive 18) 00010010 to get 11101101, then add 1 to the result to get 11101110.
Example: Find −18 in two's complement.
Answer: Invert (positive 18) 00010010 to get 11101101, then add 1 to the result to get 11101110.
HOW DO YOU REPRESENT −64 IN AN 8-BIT TWO'S COMPLEMENT FORM?
Principle: To find the two's complement of a negative number, convert the absolute value to binary, invert the bits, and add 1.
Example: Find the two's complement of −64.
Answer: The absolute value of −64, which is 01000000 in binary. Inverting the bits gives 10111111, and adding 1 gives 11000000. Therefore, −64 in two's complement is 11000000.
Example: Find the two's complement of −64.
Answer: The absolute value of −64, which is 01000000 in binary. Inverting the bits gives 10111111, and adding 1 gives 11000000. Therefore, −64 in two's complement is 11000000.
SECTION 4 | LOGIC SHIFT
WHAT IS LOGICAL BINARY SHIFT?
Principle: A logical left shift moves each bit to the left by one position, inserting a 0 at the right end.
Example: Perform a logical left shift on 10110011
Answer: The result is 01100110. The leftmost bit is discarded, and a 0 is added on the right.
Example: Perform a logical left shift on 10110011
Answer: The result is 01100110. The leftmost bit is discarded, and a 0 is added on the right.
HOW DOES A LOGICAL LEFT SHIFT AFFECT THE VALUE OF A BINARY INTEGER?
Principle: Each logical left shift multiplies the binary number by 2.
Example: What is the effect of one left shift on 00101100?
Answer: The value is doubled. 00101100 becomes 01011000.
Example: What is the effect of one left shift on 00101100?
Answer: The value is doubled. 00101100 becomes 01011000.
HOW DOES A LOGICAL RIGHT SHIFT AFFECT THE VALUE OF A BINARY INTEGER?
Principle: Each logical right shift divides the binary number by 2, ignoring any remainder.
Example: What is the effect of one right shift on 00101100?
Answer: The value is halved. 00101100 becomes 00010110.
Example: What is the effect of one right shift on 00101100?
Answer: The value is halved. 00101100 becomes 00010110.
HOW CAN YOU MULTIPLY A POSITIVE BINARY INTEGER BY 4 USING LOGICAL SHIFTS?
Principle: Two logical left shifts will multiply the number by 4.
Example: Multiply 00101010 by 4 using shifts.
Answer: After two left shifts, 00101010 becomes 10101000.
Example: Multiply 00101010 by 4 using shifts.
Answer: After two left shifts, 00101010 becomes 10101000.
SECTION 5 | HEXADECIMAL
WHAT IS HEXADECIMAL?
Principle: Hexadecimal is a base-16 number system. It extends the decimal system (base-10) by adding six more symbols. Hex uses one digit to represent the numbers 0 to 16.
Example: What are the hexadecimal equivalents for decimal 10, 11, and 12?
Answer: In hexadecimal, 10 is A, 11 is B, and 12 is C.
Example: What are the hexadecimal equivalents for decimal 10, 11, and 12?
Answer: In hexadecimal, 10 is A, 11 is B, and 12 is C.
WHY DO COMPUTERS USE HEXADECIMAL
Computers use hexadecimal as a shorthand for binary, grouping 4 bits into a single digit. This makes it easier for humans to read and write binary code and is useful as it uses less space on the screen than binary. It's commonly used in error codes, colour representation, MAC address.
HOW DO YOU CONVERT BINARY TO HEX?
Principle: Group binary digits into sets of four from right to left, then convert each group to its hex equivalent.
Example: Convert 1101011011 to hex.
Answer: Split the Binary value into 4-bit sections then take the individual value of each section - 0011 (3), 0101 (5), 1011 (B). The hex is 35B.
Example: Convert 1101011011 to hex.
Answer: Split the Binary value into 4-bit sections then take the individual value of each section - 0011 (3), 0101 (5), 1011 (B). The hex is 35B.
HOW DO YOU CONVERT HEX TO BINARY?
Principle: Convert each hex digit to its corresponding four-digit binary string.
Example: Convert 1A3 to binary.
Answer: 1 is 0001, A is 1010, 3 is 0011. The binary is 000110100011.
Example: Convert 1A3 to binary.
Answer: 1 is 0001, A is 1010, 3 is 0011. The binary is 000110100011.
HOW DO YOU CONVERT DECIMAL TO HEX?
Principle: Divide the decimal number by 16, use the remainder as a hex digit and note down from left to right, and continue with the quotient until it's less than 16.
Example: Convert 450 to hex.
Answer:
Step 1: 450 divided by 16 is 28 with a remainder of 2 (2)
Step 2: 28 divided by 16 is 1 with a remainder of 12 (C)
Step 3: 1 divided by 16 is 0 with the remainder of 1 (1)
The hex is 1C2.
Example: Convert 450 to hex.
Answer:
Step 1: 450 divided by 16 is 28 with a remainder of 2 (2)
Step 2: 28 divided by 16 is 1 with a remainder of 12 (C)
Step 3: 1 divided by 16 is 0 with the remainder of 1 (1)
The hex is 1C2.
HOW DO YOU CONVERT HEX TO DECIMAL?
Principle: Multiply each hex digit by 16 raised to its position from the right (starting at 0) and add them up.
Example: Convert 1C2 to decimal.
Answer:
Step 1: Note down the hex number: 1C2
Step 2: Note each digit in a table with the column heading increasing by the power of 16:
Example: Convert 1C2 to decimal.
Answer:
Step 1: Note down the hex number: 1C2
Step 2: Note each digit in a table with the column heading increasing by the power of 16:
|
Step 3: Multiple each of your HEX numbers by the column heading
Step 4: Add the results
256 + 192 + 2 = 450
Answer: 450
- 1 x 256 = 256
- C x 16 = 192 (Remember the value of C is 12)
- 2 x 1 = 2
Step 4: Add the results
256 + 192 + 2 = 450
Answer: 450
CONVERT DECIMAL 216 TO HEXADECIMAL
Principle: To convert from decimal to hexadecimal, divide the number by 16 and use the remainder for the hex digit. Continue with the quotient until it is less than 16.
Example: Convert 216 to hexadecimal.
Answer: 216 divided by 16 is 13 with no remainder. 13 in decimal is D in hexadecimal. Therefore, 216 in hexadecimal is D8.
Example: Convert 216 to hexadecimal.
Answer: 216 divided by 16 is 13 with no remainder. 13 in decimal is D in hexadecimal. Therefore, 216 in hexadecimal is D8.
CONVERT 10111111 TO HEXADECIMAL.
Principle: Group the binary number into sets of four digits from right to left, then convert each group to its hexadecimal equivalent.
Example: CONVERT 10111111 TO HEXADECIMAL.
Answer: Split into two groups: 1011 (B) and 1111 (F). Therefore, 10111111 in binary is BF in hexadecimal.
Example: CONVERT 10111111 TO HEXADECIMAL.
Answer: Split into two groups: 1011 (B) and 1111 (F). Therefore, 10111111 in binary is BF in hexadecimal.
SECTION 6 | TEXT
HOW DOES A COMPUTER CONVERT TEXT INTO A FORMAT IT CAN UNDERSTAND?
Computers use binary code to represent text. Each character, including letters, numbers, and symbols, is converted into a unique binary sequence. This process enables computers to store and process text efficiently
WHAT IS ASCII AND ITS LIMITATIONS?
ASCII stands for American Standard Code for Information Interchange. It uses 7 bits to represent 128 unique characters. While sufficient for English, it lacks support for international characters, symbols, and emojis.
HOW DOES UNICODE IMPROVE UPON ASCII?
Unicode provides a comprehensive character set supporting multiple languages, symbols, and emojis. It requires more bits per character than ASCII, allowing for over 143,000 unique characters and supporting global communication.
WHY ARE DIFFERENT CHARACTER SETS NECESSARY?
Character sets like ASCII and Unicode standardise the binary representation of text, ensuring consistent interpretation across different systems. Unicode's extensive character range accommodates global languages and symbols, bridging communication gaps
HOW DO BITS PER CHARACTER AFFECT TEXT REPRESENTATION?
The number of bits per character determines the size of the character set. ASCII uses 7 bits, limiting its set to 128 characters. Unicode uses more bits, allowing for a vast array of characters and symbols, enhancing linguistic and cultural inclusivity in digital communication.
SECTION 7 | SOUND
WHAT IS SOUND SAMPLING?
Sound sampling is the process of converting analoge sound waves into digital data by taking regular snapshots of the sound wave's amplitude. This digital representation allows computers to store, modify, and reproduce sound.
WHAT IS SAMPLE RATE AND ITS IMPACT ON SOUND QUALITY?
Sample rate, measured in Hz, is the number of samples taken per second during the sound recording process. Higher sample rates result in better sound quality by capturing more detail, but they also increase the file size.
WHAT DOES BIT DEPTH IN SOUND RECORDING MEAN?
Bit depth, or sample resolution, refers to the number of bits used for each sample. Higher bit depths increase the sound's dynamic range and fidelity, producing a more accurate and richer audio experience
HOW DO YOU CALCULATE THE FILE SIZE OF A SOUND RECORDING?
The file size can be calculated using the formula: File Size = Sample Rate × Bit Depth × Channels × Recording Time. This calculation highlights the relationship between sound quality (sample rate and bit depth) and file size.
WHAT IS DAC IN THE CONTEXT OF SOUND?
Digital-to-Analog Conversion (DAC) is the process of converting digital audio data back into analoge signals. This conversion is crucial for playing digital sound on speakers or headphones, making the sound audible to human ears.
HOW DOES THE SAMPLING METHOD AFFECT SOUND QUALITY?
The sampling method, including the choice of sample rate and bit depth, directly impacts sound quality. Higher rates and depths capture more detail, improving fidelity. However, this also requires more storage space and processing power.
SECTION 8 | IMAGES
WHAT IS THE BASIC UNIT OF DIGITAL IMAGES?
The basic unit of digital images is the pixel. Images are composed of numerous pixels, each representing a tiny part of the image. Pixels are encoded in binary to represent colors and intensities.
WHAT DOES IMAGE RESOLUTION MEAN?
Image resolution refers to the total number of pixels in an image, usually denoted as width × height. Higher resolutions have more pixels, offering greater detail and clarity but also resulting in larger file sizes.
HOW DOES COLOUR DEPTH AFFECT IMAGE QUALITY?"
Colour depth, measured in bits, indicates how many colours each pixel can display. Higher colour depth allows for more colours and gradients, resulting in richer and more detailed images. However, it also increases the file size.
HOW ARE FILE SIZE AND IMAGE QUALITY RELATED?
The file size of an image is influenced by its resolution and colour depth. Higher resolution and colour depth increase both the quality and size of the image file. This means more storage space is required, and more bandwidth is needed for transferring these images.
WHAT IS IMAGE COMPRESSION, AND WHY IS IT IMPORTANT?
Image compression reduces the file size of an image without degrading its quality significantly. It's essential for efficient storage and faster web page loading times. Compression can be lossy, sacrificing some quality for size reduction, or lossless, which preserves the original quality.
WHAT ARE THE EFFECTS OF CHANGING RESOLUTION AND COLOUR DEPTH ON IMAGES
Increasing the resolution or colour depth of an image enhances its detail and quality, but also increases the file size, requiring more storage. Reducing them can make files more manageable but at the cost of image clarity and colour accuracy. Balancing these factors is key to effective digital imaging.
SECTION 9 | DATA STORAGE
WHAT ARE THE BASIC UNITS OF DATA STORAGE?
Data is measured in bits and bytes. A bit is the smallest unit of data, representing a binary value of 0 or 1. A byte, consisting of 8 bits, is the standard unit for measuring data. Larger units include the kilobyte (KB), megabyte (MB), gigabyte (GB), terabyte (TB), and further up the scale, each typically calculated as powers of 1024 from bytes upwards.
WHAT ARE BINARY PREFIXES AND HOW DO THEY DIFFER FROM DECIMAL ONES?
Binary prefixes like kibi-, mebi-, and gibibyte represent sizes in powers of 2, aligning with how computers process data. For example, 1 kibibyte (KiB) equals 1024 bytes, not 1000 as in the decimal system. This distinction ensures accuracy in measuring and understanding data storage and memory in computing.
HOW DO YOU CONVERT BETWEEN DIFFERENT DATA STORAGE UNITS?
To convert between data storage units, you use multiples of 1024. For example, to convert from bytes to kibibytes, you divide by 1024. Conversely, to convert up, you multiply. Remembering the sequence of units (byte, KiB, MiB, GiB, etc.) helps manage conversions accurately
HOW CAN YOU CALCULATE THE FILE SIZE OF AN IMAGE?
The file size of an image can be calculated using the formula: File Size = Image Height x Image Width x Colour Depth / 8. The result is in bytes, given that colour depth is in bits and the division by 8 converts bits to bytes. For larger images or when using kilobytes, additional division by 1024 is necessary.
HOW IS THE FILE SIZE OF A SOUND RECORDING DETERMINED?
To calculate a sound file's size, use the formula: File Size = Sample Rate x Bit Depth x Channels x Recording Time / 8. This gives the file size in bytes, as the division by 8 converts from bits to bytes. For larger files, further division by 1024 adjusts for kilobytes or megabytes.
PROVIDE A PRACTICAL EXAMPLE OF CALCULATING DATA FILE SIZES?
Imagine calculating the size of a 3-minute (180 seconds) stereo audio file sampled at 44.1kHz with a 16-bit depth. Using the formula, File Size = 44100 (samples/second) x 16 (bits/sample) x 2 (channels) x 180 (seconds) / 8 (bits/byte), you'll find the audio file size in bytes, which can then be converted to more manageable units like MiB by dividing by 1024210242.
SECTION 10 | COMPRESSION
WHY IS DATA COMPRESSION NEEDED?
Data compression reduces the size of files, making them easier to store and faster to transmit. This efficiency is vital for conserving bandwidth, reducing storage space requirements, and shortening transmission times, especially important for large files and in contexts with limited bandwidth or storage capacity.
WHAT IS LOSSLESS COMPRESSION AND WHEN IS IT USED?
Lossless compression reduces file size without permanently eliminating any data, allowing the original file to be perfectly reconstructed when uncompressed. It's ideal for text documents and executable files, where preserving the exact original data is crucial. Examples include ZIP files and PNG images.
WHAT IS LOSSY COMPRESSION AND ITS APPLICATIONS?
Lossy compression permanently removes some data from the original file to reduce its size, which may result in a loss of quality. It's typically used for audio, video, and images where a slight loss of quality is acceptable in exchange for significantly smaller file sizes. Common formats include JPEG for images and MP3 for audio.
HOW DOES DATA COMPRESSION IMPACT FILE USAGE?
Compressed files save on storage and bandwidth, leading to quicker transfers and more space-efficient storage. The compression type, however, has significant implications on quality and use. For high-quality cinema or professional-grade projects, lossless compression is preferred to preserve maximum detail and fidelity, crucial for large screens and critical viewing. On the other hand, for everyday video streaming or mobile viewing where bandwidth may be limited and ultra-high fidelity is less critical, lossy compression offers a practical balance. It significantly reduces file size at the cost of some quality loss, which is a suitable trade-off for content consumed on smaller screens or with less emphasis on visual perfection, such as news clips or social media videos.
NAME SOME LOSSLESS COMPRESSION TECHNIQUES?
Key lossless compression techniques include Run-Length Encoding (RLE) and Huffman Encoding. RLE compresses data by collapsing consecutive repetitions of the same element into a single value and count, effective for simple graphic images. Huffman Encoding optimizes data representation based on the frequency of each element, commonly used in file compression formats like ZIP. For text compression, a method involving a 'key and value' system is Dictionary Compression. It stores unique elements of the data as a dictionary of keys and values, where the key represents the data piece and the value is a shorter representation. This technique is highly efficient for texts with repeated words or phrases, enabling significant reduction in size without loss of information.
WHAT ARE SOME EXAMPLES OF LOSSY COMPRESSION METHODS?
Lossy compression techniques include reducing the resolution or colour depth of images and lowering the sample rate or bit depth in audio files. In video compression, techniques such as temporal and spatial compression exploit similarities over time and space to reduce file size without critically compromising quality for the viewer.
|
|