chapter 1 - Basic concepts data representation Flashcards
Assembly language is described as:
A) High-level programming language
B) Hardware-independent language
C) Machine-specific language
D) Operating system language
C) Machine-specific language
Why is assembly language studied? (*)
A) To avoid hardware interactions
B) For direct access to memory and hardware
C) To replace high-level languages
D) For web development
B) For direct access to memory and hardware
A significant disadvantage of assembly language is: (*)
A) Lack of portability
B) High memory usage
C) Difficulty in system calls
D) Lack of hardware interaction
A) Lack of portability
The level at which assembly language operates in the virtual machine model is: (*)
A) Level 1
B) Level 2
C) Level 3
D) Level 4
D) Level 4
The operating system in the virtual machine model is at: (*)
A) Level 2
B) Level 3
C) Level 4
D) Level 5
B) Level 3
Which level interprets digital logic in the virtual machine model? (*)
A) Level 0
B) Level 1
C) Level 2
D) Level 3
A) Level 0
The LSB (Least Significant Bit) in binary numbers represents:
A) The highest value
B) The lowest power of 2
C) The largest memory segment
D) None of the above
B) The lowest power of 2
How many bits are in a byte? (*)
A) 4
B) 8
C) 16
D) 32
B) 8
A word in memory typically consists of how many bytes? (*)
A) 1
B) 2
C) 4
D) 8
B) 2
A double word is equivalent to how many bytes? (*)
A) 2
B) 4
C) 8
D) 16
B) 4
The base of the hexadecimal numbering system is: (*)
A) 2
B) 8
C) 10
D) 16
D) 16
An unsigned 4-bit number can represent values in the range of: (*)
A) 0 to 7
B) 0 to 15
C) -8 to 7
D) -16 to 15
B) 0 to 15
What is the range of a signed 8-bit number? (*)
A) -128 to 127
B) 0 to 255
C) -256 to 255
D) 0 to 128
A) -128 to 127
To represent an unsigned binary number with 3 bits, the range is: (*)
A) 0 to 3
B) 0 to 7
C) 0 to 8
D) -8 to 7
B) 0 to 7
The highest bit in a signed binary number is used as: (*)
A) Data
B) Address
C) Sign bit
D) Overflow flag
C) Sign bit
Which of these represents 1010b in hexadecimal? (*)
A) A
B) 10
C) 1A
D) 110
A) A
Convert the hexadecimal value 1C to binary: (*)
A) 11100
B) 11000
C) 10001
D) 10110
A) 11100
Two’s complement is calculated by: (*)
A) Adding 1 to the signed number
B) Flipping all bits and adding 1
C) Multiplying the number by 2
D) Adding the number to itself
B) Flipping all bits and adding 1
What is the 8-bit two’s complement of -28? (*)
A) 11100100
B) 11101010
C) 11110100
D) 11111000
A) 11100100
Which number is represented by the two’s complement 11110100? (*)
A) -12
B) -28
C) -116
D) 12
A) -12
What is assembly language, and how does it differ from high-level programming languages?
Assembly language is a low-level, machine-specific language that directly corresponds to machine code instructions, unlike high-level languages, which are abstract and hardware-independent.
Explain the significance of the sign bit in binary numbers.
The sign bit in a signed binary number indicates whether the number is positive (0) or negative (1).
What is the range of numbers that can be represented with 4 bits (unsigned)?
The range is 0 to 15 (binary: 0000 to 1111).
Describe the two’s complement method for representing negative numbers.
Two’s complement involves flipping all the bits of the number and adding 1 to represent the negative equivalent.
What is the advantage of using hexadecimal representation in computing?
Hexadecimal simplifies the representation of binary data by grouping bits into 4-bit segments, making it more compact and easier to read.
Convert 1234 in decimal to hexadecimal.
1234 in decimal is 4D2h in hexadecimal.
What is the 2’s complement of the binary number 1101 (signed 4-bit)?
The 2’s complement is 0011, representing -3.
How does a cache hit improve system performance?
A cache hit allows the CPU to retrieve data directly from the faster cache memory rather than accessing slower main memory.
What does ASCII stand for, and what is its purpose?
ASCII stands for the American Standard Code for Information Interchange. It encodes characters as numerical values for representation in computers.