chapter 1 - Basic concepts data representation Flashcards

1
Q

Assembly language is described as:

A) High-level programming language
B) Hardware-independent language
C) Machine-specific language
D) Operating system language

A

C) Machine-specific language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

B) For direct access to memory and hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A) Lack of portability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

D) Level 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The operating system in the virtual machine model is at: (*)

A) Level 2
B) Level 3
C) Level 4
D) Level 5

A

B) Level 3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which level interprets digital logic in the virtual machine model? (*)

A) Level 0
B) Level 1
C) Level 2
D) Level 3

A

A) Level 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

B) The lowest power of 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How many bits are in a byte? (*)

A) 4
B) 8
C) 16
D) 32

A

B) 8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A word in memory typically consists of how many bytes? (*)

A) 1
B) 2
C) 4
D) 8

A

B) 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A double word is equivalent to how many bytes? (*)

A) 2
B) 4
C) 8
D) 16

A

B) 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The base of the hexadecimal numbering system is: (*)

A) 2
B) 8
C) 10
D) 16

A

D) 16

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

B) 0 to 15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A) -128 to 127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

B) 0 to 7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The highest bit in a signed binary number is used as: (*)

A) Data
B) Address
C) Sign bit
D) Overflow flag

A

C) Sign bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which of these represents 1010b in hexadecimal? (*)

A) A
B) 10
C) 1A
D) 110

A

A) A

17
Q

Convert the hexadecimal value 1C to binary: (*)

A) 11100
B) 11000
C) 10001
D) 10110

A

A) 11100

18
Q

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

A

B) Flipping all bits and adding 1

19
Q

What is the 8-bit two’s complement of -28? (*)

A) 11100100
B) 11101010
C) 11110100
D) 11111000

A

A) 11100100

20
Q

Which number is represented by the two’s complement 11110100? (*)

A) -12
B) -28
C) -116
D) 12

A

A) -12

21
Q

What is assembly language, and how does it differ from high-level programming languages?

A

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.

22
Q

Explain the significance of the sign bit in binary numbers.

A

The sign bit in a signed binary number indicates whether the number is positive (0) or negative (1).

23
Q

What is the range of numbers that can be represented with 4 bits (unsigned)?

A

The range is 0 to 15 (binary: 0000 to 1111).

24
Q

Describe the two’s complement method for representing negative numbers.

A

Two’s complement involves flipping all the bits of the number and adding 1 to represent the negative equivalent.

25
Q

What is the advantage of using hexadecimal representation in computing?

A

Hexadecimal simplifies the representation of binary data by grouping bits into 4-bit segments, making it more compact and easier to read.

26
Q

Convert 1234 in decimal to hexadecimal.

A

1234 in decimal is 4D2h in hexadecimal.

27
Q

What is the 2’s complement of the binary number 1101 (signed 4-bit)?

A

The 2’s complement is 0011, representing -3.

28
Q

How does a cache hit improve system performance?

A

A cache hit allows the CPU to retrieve data directly from the faster cache memory rather than accessing slower main memory.

29
Q

What does ASCII stand for, and what is its purpose?

A

ASCII stands for the American Standard Code for Information Interchange. It encodes characters as numerical values for representation in computers.