Podcast
Questions and Answers
Which of the following statements accurately describes the relationship between bits, bytes, and words in computer memory?
Which of the following statements accurately describes the relationship between bits, bytes, and words in computer memory?
- A word is a sequence of bits, and a byte can consist of one or more words.
- A bit is a sequence of bytes, and a word is a single byte.
- A byte is a sequence of bits, and a word is a group of bytes that can be processed as a single unit by the computer. (correct)
- A word is always smaller than a byte, which consists of multiple bits.
Why are octal and hexadecimal number systems often used in digital computing?
Why are octal and hexadecimal number systems often used in digital computing?
- They provide a more compact way to represent binary data, making it easier for humans to read and write. (correct)
- They are required by certain programming languages for memory addressing.
- They are the native languages of computers and allow for faster processing.
- They offer better error detection capabilities compared to binary.
When converting the decimal number 200 to binary using the division-remainder method, what is the correct sequence of steps?
When converting the decimal number 200 to binary using the division-remainder method, what is the correct sequence of steps?
- Continuously multiply 200 by 2 and record the integer part of the result.
- Continuously divide 200 by 2 and record the quotient at each step.
- Continuously divide 200 by 2 and record the remainder at each step, reading the remainders from bottom to top. (correct)
- Continuously subtract powers of 2 from 200 until reaching 0, then list the powers of 2 used.
What is the primary difference between ASCII and Unicode character encoding?
What is the primary difference between ASCII and Unicode character encoding?
In the context of floating-point number representation, what is the significance of normalization?
In the context of floating-point number representation, what is the significance of normalization?
How does the two's complement method represent signed integers, and why is it preferred in modern computers?
How does the two's complement method represent signed integers, and why is it preferred in modern computers?
Which of the following best describes the role of the exponent in floating-point representation?
Which of the following best describes the role of the exponent in floating-point representation?
In the IEEE single-precision floating-point standard, how are the bits allocated for the sign, exponent, and mantissa?
In the IEEE single-precision floating-point standard, how are the bits allocated for the sign, exponent, and mantissa?
What is the purpose of using a biased exponent in floating-point representation, and how is the bias value calculated?
What is the purpose of using a biased exponent in floating-point representation, and how is the bias value calculated?
When converting the decimal fraction 0.625 to binary using the multiplication method, what is the resulting binary representation?
When converting the decimal fraction 0.625 to binary using the multiplication method, what is the resulting binary representation?
A computer system uses 8 bits to represent unsigned integers. What is the range of values that can be represented?
A computer system uses 8 bits to represent unsigned integers. What is the range of values that can be represented?
What is the purpose of the parity bit in ASCII encoding?
What is the purpose of the parity bit in ASCII encoding?
In the context of representing sound, how does the sampling rate affect the quality of the digital representation?
In the context of representing sound, how does the sampling rate affect the quality of the digital representation?
What is the main advantage of the Unicode standard over character encoding standards like ASCII and EBCDIC?
What is the main advantage of the Unicode standard over character encoding standards like ASCII and EBCDIC?
Which of the following is the correct representation of the decimal number 35 in hexadecimal?
Which of the following is the correct representation of the decimal number 35 in hexadecimal?
Flashcards
What is Data?
What is Data?
Facts about entities, or unprocessed information.
What is a Bit?
What is a Bit?
A digit in the binary number system, represented as 0 or 1.
What is a Nibble?
What is a Nibble?
A group of four bits, representing half of a byte.
What is a Byte?
What is a Byte?
Signup and view all the flashcards
What is a Word?
What is a Word?
Signup and view all the flashcards
What is Octal?
What is Octal?
Signup and view all the flashcards
What is Hexadecimal?
What is Hexadecimal?
Signup and view all the flashcards
What is a Positional Numbering System?
What is a Positional Numbering System?
Signup and view all the flashcards
What is a Division-Remainder Method?
What is a Division-Remainder Method?
Signup and view all the flashcards
What is a Radix Point?
What is a Radix Point?
Signup and view all the flashcards
What is the range of N bits?
What is the range of N bits?
Signup and view all the flashcards
What is Signed Integer Representation?
What is Signed Integer Representation?
Signup and view all the flashcards
What is Sign Magnitude?
What is Sign Magnitude?
Signup and view all the flashcards
What is Two's Complement?
What is Two's Complement?
Signup and view all the flashcards
Representation of Floating-Point Numbers
Representation of Floating-Point Numbers
Signup and view all the flashcards
Signup and view all the flashcards
Study Notes
- Data represents facts or unprocessed information about entities.
- Data can be textual or non-textual (audio, video, pictures).
Number Systems
- Digital computers use binary systems, which have two digits: 0 and 1.
- Data is stored in computer memory as a sequence of binary digits (bits).
- RAM is structured as a linear array of cells, each storing a string of bits representing data or instructions.
- Memory cells are grouped into words of fixed size and have unique addresses for easy access.
- The CPU can read and write data to these memory locations.
- A bit represents electrical states (off or on, high or low) in computer circuitry.
- '1' represents the presence of an electrical pulse.
- '0' represents the absence of an electrical pulse.
- A bit is the basic unit of information in digital computers, represented by physical quantities called signals.
- Logic circuits called gates manipulate binary information, producing binary 1 or 0 signals based on input logic requirements.
Data Units
- Bits: a sequence of binary digits.
- Nibble: a group of 4 bits (half a byte).
- Byte: a group of 8 bits.
- Word: a sequence of bits of fixed size (e.g., 16, 32, or 64 bits).
- Word size determines the amount of data a computer can fetch from memory at once.
- Computer storage capacity and internet bandwidth are measured in bytes.
- Kilo refers to 2 to the power of 10, which equals 1024.
- 1 Byte equals 8 bits.
- 1KB equals 1024 bytes (thousands of bytes).
- 1MB equals 1024KB (millions of bytes).
- 1GB equals 1024MB (billions of bytes).
- 1TB equals 1024GB.
- 640KB memory equals 655,360 bytes.
- 256MB RAM roughly equals 256 million bytes.
- Modern computers use memory cards, flash drives, RAM and hard disk drives, available in gigabytes.
Octal and Hexadecimal Systems
- Octal (base 8) and Hexadecimal (base 16) systems are used to abbreviate long binary digits.
- The word size can be abbreviated with octal (3 binary digits per octal digit) or hexadecimal digits (4 binary digits per hexadecimal digit).
- Octal is sometimes used for file permissions in Unix systems.
- Hexadecimal is more flexible and commonly used; Two hexadecimal digits specify one byte.
Number System Bases
- A number system of base r uses r distinct symbols for digits.
- Binary and hexadecimal are key number systems in Computer Science.
- The base is written as a subscript to distinguish between different bases.
- Decimal: Base 10, uses digits 0-9.
- Used by humans to express quantities.
- Binary: Base 2, uses digits 0 and 1 (bits).
Positional Numbering Systems
- These systems represent numeric values through increasing powers of a radix (base).
- Each position is weighted by a power of the radix, so it is often called a “weighted numbering system”.
- Examples of position and weight for binary, octal, and hexadecimal systems.
- Conversion of decimal integers to base n uses the division-remainder method, involving successive divisions by the base.
- Read the remainders from bottom to top to get the digits of the result.
Number Range
- With N bits, unsigned integers can range from 0 to 2^N – 1.
- For example, 4 bits can represent 0 to 15, and 8 bits can represent 0 to 255.
- The range of values is important in arithmetic operations on binary numbers.
Converting Decimal Fractions to Base n
- Fractions in any base system can be approximated using negative powers of a radix.
- Radix points separate the integer and fractional parts of a number.
- In the decimal system, the radix point is called a decimal point and in binary, it is called a binary point.
- A repeating string in one base may not repeat in another base. For example, 2/3 is a repeating decimal, but terminates in ternary (0.2).
- Decimal fractions can be converted to base n by repeatedly multiplying the fractional part by n.
- Pick out the integer part of the multiplication process and read from top to bottom.
Base Conversions
- Convert a given number in base n to decimal by using the positional numbering system.
- To convert binary numbers to hexadecimal, organize the bits into groups of 4 and replace them with their hexadecimal equivalent, starting from the LSB (rightmost bit).
- To convert hexadecimal to binary, find the binary equivalent of each hexadecimal digit.
- To convert binary numbers to octal, organize the bits into groups of 3 and replace them with their octal equivalent.
- Conversion from octal to binary is done similar to the way hexadecimal is converted to binary.
Signed Integer Representation
- Signed integers are integers with a negative sign.
- Methods include:
- Sign Magnitude
- One's Complement
- Two's Complement
- Range of integers using n bits: -2^(n-1) – 1 to +2^(n-1) – 1.
- Signed Magnitude:
- The leftmost bit (MSB) is the sign bit (0 for positive, 1 for negative).
- Remaining bits indicate the magnitude of the number.
- Limited range and two representations for zero (+0 and -0) are major disadvantages.
One's Complement
- Obtain the binary equivalent of the integer.
- Flip all the bits (change 1 to 0, and 0 to 1).
- Not used in modern computers.
- Two's Complement:
- Obtain the binary equivalent of the integer
- Flip the bits (change 1 to 0, and 0 to 1).
- Add 1 to the flipped bits.
- Discard any bit ‘carried' from the MSB.
- Unlike signed magnitude and one's complement methods, in two's complement there is only one representation of 0.
- Modern computers use two's complement to perform arithmetic operations.
Floating-Point Numbers
- Scientific notation expresses numbers in two parts consisting of a fractional part, called a mantissa, and an exponential part, which indicates the power of ten to which the mantissa should be raised to obtain the value we need.
- Digital computers use floating-point numbers consisting of a sign bit, an exponent part, and a fractional part called a significand (or mantissa).
- Optimize by number of bits used in the exponent and significand depending on whether the user would like to optimize for range (more bits in the exponent) or precision (more bits in the significand).
- Floating-point numbers are normalized.
- A non-normalize number can be normalized by shifting the radix point in the mantissa to the left or right and decreasing or increasing the exponent by a number of positions shifted.
- Two's complement is not used to represent the exponent, instead, a biased representation is used.
Biased System (2n-1 Excess)
- Converts every integer into a non-negative integer, which is then represented in binary.
- With n bits, the biased representation of an integer N is given by N + 2^(n-1).
- Each representation is 2^(n-1) excess in the value it represents.
- The Institute of Electrical and Electronic Engineers (IEEE) published a standard consisting of IEEE-754, for representing floating point numbers.
- The IEEE standard specifies the number of bits to be used when representing floating point numbers.
- IEEE Single precision uses 32 bits: 8 bits for the exponent, 23 bits for significand, and 1 bit for the sign (excess 127 bias).
- IEEE double precision uses 64 bits: 11 bits for exponent, 53 bits for the mantissa (significand), and 1 bit for the sign. The bias is 1023.
Character Representation
- Computers represent numbers, letters (upper and lowercase), and special symbols, known as alphanumeric characters.
- Alphanumeric data are represented by assigning a unique binary code.
- Encodings schemes:
- Binary Coded Decimal (BCD)
- American Standard Code for Information Interchange (ASCII)
- Extended Binary Coded Decimal Interchange Code (EBCDIC)
- Unicode
Character Encoding
- EBCDIC: -Uses an 8-bit code, representing 256 characters (1 byte per character). -The upper nibble represents the zone bits, and the lower nibble represents the numeric values. -Characters are represented by appending numeric (digit) bits to zone bits.
- ASCII: -Defines codes for control characters, digits, letters, special characters, and the space character. -The first version uses 7-bit code representing 128 characters The second version uses 8 bits to represent 256 different characters. -Parity is used for error detection, with the MSB used for parity. -Partitioned into zone bits and numeric bits, similar to EBCDIC.
- Unicode: -A 16-bit alphabet, compatible with ASCII and Latin-1, allowing for the encoding of most characters in every language.
- Representation of pictures & graphic data: -Pictures are made up of pixels of different colours. -Pixel is short for picture element and a grid of pixels represent computer graphic data. -A byte can represent a single pixel. -Modern video games and colourful graphics use several bytes for each pixel. -Pixels have colours, and this can be represented as RGB (Red, Green, Blue) from 0 to 255.
- Graphics formats: -JPEG and GIF use compressed formats by storing the patterns of pixels, instead of storing every pixel.
- Representation of Sound: -Sound occurs as an analog wave which must be converted to digital data. -This called analog to digital conversion. -After conversion it is represented in a bits pattern made of Os and 1s.
- Converting analog waves into digital uses a process called sampling.
- Heights of the sound waves are sampled at regular intervals of time.
- Each sample occupies one byte if it is an analog wave, then the wave can be one of 256 different heights.
- The heights represent the decibel level of the sound.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.