Podcast
Questions and Answers
What is the key field used for in a logical record?
What is the key field used for in a logical record?
- To define a physical record
- To store external representations
- To manage memory areas
- To hold the identifier key (correct)
An external representation of data is intended for computing machines.
An external representation of data is intended for computing machines.
False (B)
What must data be coded as in a computer system to be recognized later?
What must data be coded as in a computer system to be recognized later?
Data type
Data must be represented as a sequence of _______ and _______ for internal representation.
Data must be represented as a sequence of _______ and _______ for internal representation.
Match the following types of data representation with their characteristics:
Match the following types of data representation with their characteristics:
Which of the following is an example of a non-positional notation?
Which of the following is an example of a non-positional notation?
Negative numbers were included in Roman numeral representation.
Negative numbers were included in Roman numeral representation.
What is the purpose of coding data for long-term archival storage?
What is the purpose of coding data for long-term archival storage?
What type of memory allows both reading and writing of data?
What type of memory allows both reading and writing of data?
Data stored in ROM can be modified after it has been saved.
Data stored in ROM can be modified after it has been saved.
What does 1 MB equal in bytes?
What does 1 MB equal in bytes?
Mass storage systems are typically __________ than main memory.
Mass storage systems are typically __________ than main memory.
Match the following terms with their definitions:
Match the following terms with their definitions:
What is the typical capacity of a CD?
What is the typical capacity of a CD?
Magnetic systems are a form of mass storage.
Magnetic systems are a form of mass storage.
What does a file represent in a mass storage system?
What does a file represent in a mass storage system?
What is the largest positive integer that can be represented in an 8-bit two's complement system?
What is the largest positive integer that can be represented in an 8-bit two's complement system?
In two's complement representation, there are two distinct values for zero.
In two's complement representation, there are two distinct values for zero.
What is the process to negate a number in two's complement notation?
What is the process to negate a number in two's complement notation?
The binary representation of -6 in four-bit two's complement is ______.
The binary representation of -6 in four-bit two's complement is ______.
Match the following operations with their appropriate outcomes in two's complement:
Match the following operations with their appropriate outcomes in two's complement:
When does an overflow occur in two's complement addition?
When does an overflow occur in two's complement addition?
In two's complement, adding two binary numbers is different from adding unsigned binary numbers.
In two's complement, adding two binary numbers is different from adding unsigned binary numbers.
What is the binary representation of the two's complement for -1 using 8 bits?
What is the binary representation of the two's complement for -1 using 8 bits?
What does a parity bit indicate in a bit pattern?
What does a parity bit indicate in a bit pattern?
A pattern with an even number of 1s under odd parity must contain an error.
A pattern with an even number of 1s under odd parity must contain an error.
What is the Hamming Distance between the patterns 110001 and 111110?
What is the Hamming Distance between the patterns 110001 and 111110?
In error-correcting codes, patterns with fewer than n/2 errors can be __________.
In error-correcting codes, patterns with fewer than n/2 errors can be __________.
What is the minimum Hamming Distance between any two legal patterns in the code?
What is the minimum Hamming Distance between any two legal patterns in the code?
The parity bit is added to the pattern based on the total number of bits in the pattern.
The parity bit is added to the pattern based on the total number of bits in the pattern.
Explain how Hamming distance can be used to correct errors in a code.
Explain how Hamming distance can be used to correct errors in a code.
Which of the following compression types results in permanent data loss?
Which of the following compression types results in permanent data loss?
Run-length encoding replaces long sequences of repeated items with a single instance and a count.
Run-length encoding replaces long sequences of repeated items with a single instance and a count.
What is the purpose of data compression?
What is the purpose of data compression?
In ______ compression, the decompressed data is exactly the same as the original data.
In ______ compression, the decompressed data is exactly the same as the original data.
Match the following data compression techniques with their descriptions:
Match the following data compression techniques with their descriptions:
A compression ratio of 14:1 indicates that the compressed data is how many times smaller than the original?
A compression ratio of 14:1 indicates that the compressed data is how many times smaller than the original?
Frequency-dependent encoding results in a fixed length for all data items.
Frequency-dependent encoding results in a fixed length for all data items.
What does the term 'two's complement' refer to?
What does the term 'two's complement' refer to?
What is the range of values represented in 1's Complement using 8 bits?
What is the range of values represented in 1's Complement using 8 bits?
The 2's complement representation of a positive integer is the same as the original binary with the most significant bit set to 1.
The 2's complement representation of a positive integer is the same as the original binary with the most significant bit set to 1.
How is the 1's complement of a negative integer calculated?
How is the 1's complement of a negative integer calculated?
In 1's complement, the two representations of zero are ______ and ______.
In 1's complement, the two representations of zero are ______ and ______.
Match the following representations with their respective ranges:
Match the following representations with their respective ranges:
What is the first step to calculate the 2's complement of -19 from its binary code for +19?
What is the first step to calculate the 2's complement of -19 from its binary code for +19?
The end-around carry is an issue that exists when using 2's complement.
The end-around carry is an issue that exists when using 2's complement.
What is the 1's complement of binary number 0001 0011?
What is the 1's complement of binary number 0001 0011?
Flashcards
RAM vs. ROM
RAM vs. ROM
Data saved in RAM can be modified because it can be read and written. However, data stored in ROM is read-only.
Main Memory: Physical View
Main Memory: Physical View
Main memory is organized into banks, each bank containing a number of bytes arranged in an array.
RAM, ROM, and I/O Ports
RAM, ROM, and I/O Ports
Main memory contains bytes stored in RAM, ROM, and input/output ports. RAM bytes can be read and written while ROM bytes are read-only.
Main Memory: Logical View
Main Memory: Logical View
Signup and view all the flashcards
Measuring Memory Capacity
Measuring Memory Capacity
Signup and view all the flashcards
Mass Storage Systems
Mass Storage Systems
Signup and view all the flashcards
Disk Storage System
Disk Storage System
Signup and view all the flashcards
CD & DVD Data Storage
CD & DVD Data Storage
Signup and view all the flashcards
Files: Unit of Data
Files: Unit of Data
Signup and view all the flashcards
Logical Record
Logical Record
Signup and view all the flashcards
Field
Field
Signup and view all the flashcards
Key Field
Key Field
Signup and view all the flashcards
Physical Record
Physical Record
Signup and view all the flashcards
Buffer
Buffer
Signup and view all the flashcards
External Data Representation
External Data Representation
Signup and view all the flashcards
Internal Data Representation
Internal Data Representation
Signup and view all the flashcards
Coding
Coding
Signup and view all the flashcards
2's Complement
2's Complement
Signup and view all the flashcards
1's Complement
1's Complement
Signup and view all the flashcards
1's Complement Range
1's Complement Range
Signup and view all the flashcards
2's Complement Range
2's Complement Range
Signup and view all the flashcards
Multiple Representation of Zero (1's Complement)
Multiple Representation of Zero (1's Complement)
Signup and view all the flashcards
End-Around Carry
End-Around Carry
Signup and view all the flashcards
2's Complement of Negative Number
2's Complement of Negative Number
Signup and view all the flashcards
2's Complement of Positive Number
2's Complement of Positive Number
Signup and view all the flashcards
Compression Ratio
Compression Ratio
Signup and view all the flashcards
Lossy Compression
Lossy Compression
Signup and view all the flashcards
Lossless Compression
Lossless Compression
Signup and view all the flashcards
Run-length encoding
Run-length encoding
Signup and view all the flashcards
Relative encoding
Relative encoding
Signup and view all the flashcards
Frequency-dependent encoding
Frequency-dependent encoding
Signup and view all the flashcards
Adaptive Dictionary Encoding
Adaptive Dictionary Encoding
Signup and view all the flashcards
Huffman Encoding
Huffman Encoding
Signup and view all the flashcards
Parity Bit
Parity Bit
Signup and view all the flashcards
Two's Complement Representation of Negative Integers
Two's Complement Representation of Negative Integers
Signup and view all the flashcards
Parity Bit (Definition)
Parity Bit (Definition)
Signup and view all the flashcards
Two's Complement Overflow Detection
Two's Complement Overflow Detection
Signup and view all the flashcards
Largest Positive Integer in Two's Complement
Largest Positive Integer in Two's Complement
Signup and view all the flashcards
Error-Correcting Codes
Error-Correcting Codes
Signup and view all the flashcards
Hamming Distance
Hamming Distance
Signup and view all the flashcards
Negating a Number in Two's Complement
Negating a Number in Two's Complement
Signup and view all the flashcards
Addition in Two's Complement
Addition in Two's Complement
Signup and view all the flashcards
Error-Correcting Codes using Hamming Distance
Error-Correcting Codes using Hamming Distance
Signup and view all the flashcards
Zero in Two's Complement
Zero in Two's Complement
Signup and view all the flashcards
Error-Correcting Codes: Single Bit Change
Error-Correcting Codes: Single Bit Change
Signup and view all the flashcards
Sign Bit in Two's Complement
Sign Bit in Two's Complement
Signup and view all the flashcards
Hamming Distance Table
Hamming Distance Table
Signup and view all the flashcards
Two's Complement Representation
Two's Complement Representation
Signup and view all the flashcards
Study Notes
Data Storage
- Data stored in a computer is represented by bit patterns
- Bits (binary digits) can represent different values, for example numeric values (1 or 0), boolean values (true or false) or voltage (high or low)
- Data patterns can represent numbers, text characters, images, sound, or anything else
- Boolean operations manipulate true/false values, often used as logical operations on bits
- Boolean operations include AND, OR, XOR (exclusive OR), and NOT
- Gates are electronic circuits that perform Boolean operations on input values, acting as fundamental building blocks of computers
- Flip-flops are circuit devices, built from gates, that can store one bit of data
- A byte is typically 8 bits
- Main memory acts as a central storage unit in a computer system, storing programs and data during operations utilizing semiconductor integrated circuits
- Each memory unit (cell) is assigned a unique address
- Main memory is divided into banks and cells, with each cell represented in an organized array
- Data in RAM is volatile, while data in ROM is non-volatile
- Mass storage systems are non-volatile and usually much larger than main memory, performing slower read/write operations compared to main memory
- Mass storage systems include magnetic systems (disks, tapes) and optical systems (CDs, DVDs)
- Flash technology (flash drives, SD cards) is also a mass storage method
- A file is the unit of data stored on a mass storage system
- Logical records are natural groups within a file
- Key fields hold identifier keys within a logical record
- Physical records are blocks of data that fit the characteristics of the storage device
- Buffers are memory areas used for temporarily storing data
Representing Data
- Data is coded to be read and understood by a system (internally or externally), through coding systems
- Information is coded for internal computations, presentation purposes (text, graphics, sound), and long-term storage (databases, archives)
- Coding ensures that data can be recognized later in the system
- External representation: (for people) is typically a visually understandable format, like handwritten, graphical, etc...
- Internal representation: (for computing machines) is a sequence of 0s and 1s
- For numeric data we use positional formats (e.g. decimal, binary, octal, hexadecimal)
Representing Non-numeric Data
- Computing devices code letters and special symbols independently
- Common coding schemes for symbols are ASCII and EBCDIC
Representing Strings in ASCII
- A 'string' is a sequence of bytes (characters) in ASCII
- Strings typically contain text characters
- Strings can have any number of characters
- The end of a string needs to be identified
Representing Numeric Data
- Internal number representation is always a sequence of 0's and 1's (binary)
- External representation uses various notations like Roman Numerals and positional notations (decimal, binary, octal, hexadecimal)
- Internal number representations can cause overflow when a number is too large to be stored
Representing Data Externally
- Non-positional notations include Roman Numerals, where digit position does not carry weights. The meaning of digits depends on the context.
- Positional notations depend on the position of the digits in the number. Decimal, binary, octal and hexadecimal are examples of positional notations.
Octal Encoding
- Octal encoding is a way to represent bits in groups of three
Representing Images
- Bit map techniques represent images as collections of dots (pixels)
- Pixel values are either 0 or 1 (binary) for black and white images and range from 0-255 for grayscale images, or colour images using RGB
- Vector techniques represent images as sets of lines and curves (circles, polygons).
Colour Depth
- Colour depth of images is determined by the available palette size
- Image formats like PNG, BMP, PIC, GIF, JPEG and TIFF are common
- 1-bit images have 2 colours (e.g., black and white)
- 8-bit images support 256 grey levels
- 24-bit images support 16 million colours
Representing Numeric Values
- Binary notation uses bits to represent numbers in base two.
- Limitations of computer representations of numeric values can include overflow, which happens when a number is too big to be represented within the available bits
Binary Representation
- Base ten system uses positions to define quantities and the position (e.g. hundred, ten, one), and their respective quantities
- Base two system uses positions to define quantities and positions (e.g. eight, four, two, one) and their respective quantities
Decoding Binary Representation
- The procedure to decode a binary number can involve evaluating the contribution of each bit based on its positional weight and converting it to the decimal equivalent
Positive Integer in Binary Notation
- An algorithm to find a positive integer's binary representation involves repeatedly dividing the value by two and recording the remainder, until a quotient of zero is obtained. The binary representation consists of the remainders from right to left
Binary Addition
- Binary addition follows rules that include addition of bits and carry forward when the sum of any two bits is greater than 1.
Fractions in Binary
- Binary fractions can be decoded according to the positional weight of each bit, allowing their representation to be converted to a decimal representation.
- To encode binary fractions, repeatedly subtract successive negative powers of 2, recording the success (1) or failure (0) of each subtraction from the radix point until the result is 0.
Representing Integers
- Unsigned integers, represented in base two and occupying 4 bytes, range from 0 to 4294967295
- Integers occupy 2n bytes in memory (usually 1, 2, or 3)
Signed Integers
- Signed integers are whole numbers that can be positive or negative, with ranges from -2147483648 to 2147483647
- These are represented in ways like sign-magnitude notation, one's complement notation, or two's complement notation.
Representing Integers (Internally)Â
- Sign-magnitude, one's complement, and two's complement notations allow to represent both positive and negative values. The choice of representation influences the way negative values are codified
Representing Integers (Internally) Complement Notations
- One's complement involves subtracting each bit from 1
- Two's complement involves subtracting each bit from 1 and adding 1 to the result.
Ranges of Values of N bitsÂ
- 1's complement has a range of values that can be represented in n bits from -2n-1 + 1 to 2n-1 -1. For one byte (n=8), the range is from -127 to +127
- 2's complements have a range from -2n-1 to 2n-1 -1. For one byte (n=8), the range is from -128 to +127
Two's Complement
- Two's complement is a notation to represent both positive and negative integer values. There is only one zero in two's complement (00000000)
- Negating a number in two's complement involves inverting all the bits and adding 1 to the result.
- Two's complement addition is the same as adding two unsigned numbers but there is a need to detect overflow.
Excess-N Representation
- Excess-N representation encodes values by adding a constant offset (N) to the intended value.
- This system is typically used to represent signed numbers in cases where the representation system avoids the additional complexity associated with sign representation.
Data Compression
- Data compression reduces the amount of data needed for storage and transfer
- Compression Ratios describe the ratio of the original data size to the compressed size, e.g. 14:1
Lossy vs Lossless Compression
- Lossy compression discards some data permanently, while the decompressed data differs from the original
- Lossless compression preserves all data in the original file, such that if the file is decompressed the resulting file is identical to the original
Generic Data Compression Techniques
- Run-length encoding identifies repeated binary patterns and represents them with a single instance of the pattern and a count
- Relative encoding records differences between consecutive data units, rather than representing each unit completely
Frequency-Dependent Encoding
- Huffman coding uses variable-length bit patterns to represent data items, with frequent items having shorter codes, which is commonly used during text compression.
Adaptive Dictionary Encoding
- Adaptive dictionary encoding (e.g., Lempel-Ziv encoding) constructs a dictionary of previously encountered blocks and encodes subsequent instances using a reference to that block in the dictionary. The dictionary can change during encoding.
Compressing Images
- GIF uses lossy compression to limit colours to 256 and dictionary encoding
- JPEG encompasses several compression techniques.
Communication Errors
- Data bits may be corrupted during transmission or retrieval from storage
- Errors can occur due to factors such as dirt or damage on a disc surface, circuit malfunctions or static electricity on transmission path.
Parity Bits
- Parity refers to the oddness or evenness of the number of bits in a pattern. Odd parity requires each pattern to contain an odd number of 1s; even parity requires an even number of 1s.
- Parity bits are extra bits to ensure odd or even parity in a message sequence, allowing the reader to detect errors in the message.Â
Error-Correcting Codes
- Error-correcting codes are used to detect and correct errors in data transmission
- Hamming Distance measures the difference between two bit patterns. The greater the Hamming Distance between two different patterns the less likely they are to overlap (allowing for error detection and correction).
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.