Computer Data Representation Quiz
47 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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.

    False

    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.

    <p>0's, 1's</p> Signup and view all the answers

    Match the following types of data representation with their characteristics:

    <p>External representation = Easily understandable by humans Internal representation = Sequence of 0's and 1's Positional notation = Weights assigned based on position Floating point notation = Used for representing decimal numbers</p> Signup and view all the answers

    Which of the following is an example of a non-positional notation?

    <p>Roman Numerals</p> Signup and view all the answers

    Negative numbers were included in Roman numeral representation.

    <p>False</p> Signup and view all the answers

    What is the purpose of coding data for long-term archival storage?

    <p>To preserve data in databases or archives for future use.</p> Signup and view all the answers

    What type of memory allows both reading and writing of data?

    <p>RAM</p> Signup and view all the answers

    Data stored in ROM can be modified after it has been saved.

    <p>False</p> Signup and view all the answers

    What does 1 MB equal in bytes?

    <p>1,048,576 bytes</p> Signup and view all the answers

    Mass storage systems are typically __________ than main memory.

    <p>larger</p> Signup and view all the answers

    Match the following terms with their definitions:

    <p>RAM = Volatile memory that can be read and written ROM = Non-volatile memory that can only be read Mass Storage = Data remains when the computer is off File = Unit of data stored on a mass storage system</p> Signup and view all the answers

    What is the typical capacity of a CD?

    <p>600-700 MB</p> Signup and view all the answers

    Magnetic systems are a form of mass storage.

    <p>True</p> Signup and view all the answers

    What does a file represent in a mass storage system?

    <p>A unit of data</p> Signup and view all the answers

    What is the largest positive integer that can be represented in an 8-bit two's complement system?

    <p>127</p> Signup and view all the answers

    In two's complement representation, there are two distinct values for zero.

    <p>False</p> Signup and view all the answers

    What is the process to negate a number in two's complement notation?

    <p>Invert all bits and add 1.</p> Signup and view all the answers

    The binary representation of -6 in four-bit two's complement is ______.

    <p>1010</p> Signup and view all the answers

    Match the following operations with their appropriate outcomes in two's complement:

    <p>Overflow detection = Occurs when the carry into the MSB does not equal the carry out Adding two positive integers = Can result in a negative value if overflow occurs Negating a number = Invert bits and add 1 Largest positive integer in 8 bits = 127</p> Signup and view all the answers

    When does an overflow occur in two's complement addition?

    <p>When the result exceeds the maximum positive value</p> Signup and view all the answers

    In two's complement, adding two binary numbers is different from adding unsigned binary numbers.

    <p>False</p> Signup and view all the answers

    What is the binary representation of the two's complement for -1 using 8 bits?

    <p>11111111</p> Signup and view all the answers

    What does a parity bit indicate in a bit pattern?

    <p>Whether the number of 1s is odd or even</p> Signup and view all the answers

    A pattern with an even number of 1s under odd parity must contain an error.

    <p>True</p> Signup and view all the answers

    What is the Hamming Distance between the patterns 110001 and 111110?

    <p>3</p> Signup and view all the answers

    In error-correcting codes, patterns with fewer than n/2 errors can be __________.

    <p>corrected</p> Signup and view all the answers

    What is the minimum Hamming Distance between any two legal patterns in the code?

    <p>3</p> Signup and view all the answers

    The parity bit is added to the pattern based on the total number of bits in the pattern.

    <p>False</p> Signup and view all the answers

    Explain how Hamming distance can be used to correct errors in a code.

    <p>By designing the code with a minimum Hamming distance of n, patterns with fewer than n/2 errors can be replaced with the closest valid code.</p> Signup and view all the answers

    Which of the following compression types results in permanent data loss?

    <p>Lossy compression</p> Signup and view all the answers

    Run-length encoding replaces long sequences of repeated items with a single instance and a count.

    <p>True</p> Signup and view all the answers

    What is the purpose of data compression?

    <p>To reduce the amount of data needed for storage or transfer.</p> Signup and view all the answers

    In ______ compression, the decompressed data is exactly the same as the original data.

    <p>lossless</p> Signup and view all the answers

    Match the following data compression techniques with their descriptions:

    <p>Run-length encoding = Replaces repeated patterns with a count Huffman coding = Uses variable lengths based on frequency of items LZW encoding = Dynamic dictionary encoding system Relative encoding = Records differences between consecutive units</p> Signup and view all the answers

    A compression ratio of 14:1 indicates that the compressed data is how many times smaller than the original?

    <p>1/14th the size</p> Signup and view all the answers

    Frequency-dependent encoding results in a fixed length for all data items.

    <p>False</p> Signup and view all the answers

    What does the term 'two's complement' refer to?

    <p>A method of representing signed binary numbers.</p> Signup and view all the answers

    What is the range of values represented in 1's Complement using 8 bits?

    <p>-127 to +127</p> Signup and view all the answers

    The 2's complement representation of a positive integer is the same as the original binary with the most significant bit set to 1.

    <p>False</p> Signup and view all the answers

    How is the 1's complement of a negative integer calculated?

    <p>Subtract its magnitude from 2^n - 1.</p> Signup and view all the answers

    In 1's complement, the two representations of zero are ______ and ______.

    <p>00000000, 11111111</p> Signup and view all the answers

    Match the following representations with their respective ranges:

    <p>1's Complement = -127 to 127 2's Complement = -128 to 127</p> Signup and view all the answers

    What is the first step to calculate the 2's complement of -19 from its binary code for +19?

    <p>Invert the digits.</p> Signup and view all the answers

    The end-around carry is an issue that exists when using 2's complement.

    <p>False</p> Signup and view all the answers

    What is the 1's complement of binary number 0001 0011?

    <p>1110 1100</p> Signup and view all the answers

    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.

    Quiz Team

    Related Documents

    Lect1_DataStorage.ppt PDF

    Description

    Test your knowledge on data representation concepts in computer systems. This quiz covers topics like coding data, types of memory, and characteristics of various storage systems. Challenge yourself with matching terms and definitions related to mass storage and archival storage.

    More Like This

    Computers Today and Tomorrow Chapter 2
    29 questions
    Introduction to Computing - Week 2
    9 questions
    C4 Almacenamiento - T1
    25 questions

    C4 Almacenamiento - T1

    SecureBliss4137 avatar
    SecureBliss4137
    Computer Memory Basics
    8 questions

    Computer Memory Basics

    InfallibleVenus avatar
    InfallibleVenus
    Use Quizgecko on...
    Browser
    Browser