Module 1-7 Flashcards

1
Q

Set of instructions for handling various operations such as
getting input from keyboard, displaying information on screen, and performing various other
jobs.

A

Machine Language Instructions

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

Understanding assembly language makes one aware of:

A
  • How programs interface with OS, processor, and BIOS.
  • How data is presented in memory and other external devices.
  • How the processor accesses and executes instructions.
  • How instructions access and process data.
  • How a program access external device.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The main internal hardware of a PC consists of:

A

processor, memory, and registers.

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

processor components that hold data and address.

A

Register

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

To execute a program:

A

the system copies it from the external device into the internal memory.

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

Which part executes the program instructions:

A

Processor

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

The fundamental unit of a computer storage

A

Bit

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

How many bits make a byte

A

9

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

How many bits are used for data and how many for parity?

A

8 for data and 1 for parity.

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

According to the rule of parity, the number of bits that are ON (1) in each byte should always be ________.

A

Odd

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

What causes the system to assume that there had been a parity error (though rare), which
might have been caused due to hardware fault or electrical disturbance.

A

If the parity is even

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

Data size of word

A

2-byte (16 bit)

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

Data size of Doubleword

A

4-byte (32 bit)

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

Data size of Quadword

A

8-byte (64 bit)

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

Data size of Paragraph

A

16-byte (128 bit)

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

Data size of Kilobyte

A

1024 bytes

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

Data size of Megabyte

A

1,048,576 bytes

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

Number System that uses base 16.

A

Hexadecimal Number System

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

The process through which the processor controls the execution of instructions

A

Fetch-decode-execute cycle or the execution cycle.

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

The execution cycle consists of three continuous steps:

A

 Fetching the instructions from memory.
 Decoding or identifying the instruction.
 Executing the instruction.

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

The two kinds of memory addresses

A

Absolute Address & Segment Address

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

A direct reference of specific location.

A

Absolute Address

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

Starting address of a memory segment with the offset
value.

A

Segment (Offset)

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

The process of finding and resolving defects or problems within a computer
program that prevent correct operation of computer software or a system.

A

Debugging

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

It can act as an assembler, disassembler, or hex pump program allowing users to interactively
examine memory contents (in assembly language, hexadecimal, or ASCII), make changes, and
selectively execute COM, EXE, and other file types.

A

MS-DOS Debug

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

In Registers Mnemonics, what does the Accumulator Register Symbolize

A

AX

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

In Registers Mnemonics, what does the Base Register Symbolize

A

BX

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

In Registers Mnemonics, what does the Count Register Symbolize

A

CX

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

In Registers Mnemonics, what does the Data Register Symbolize

A

DX

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

In Registers Mnemonics, what does the Source Index Register Symbolize

A

SI

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

In Registers Mnemonics, what does the Destination Index Register Symbolize

A

DI

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

In Registers Mnemonics, what does the Stack Point Register Symbolize

A

SP

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

In Registers Mnemonics, what does the Base Point Register Symbolize

A

BP

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

In Registers Mnemonics, what does the Code Segment Register Symbolize

A

CS

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

In Registers Mnemonics, what does the Data Segment Register Symbolize

A

DS

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

In Registers Mnemonics, what does the Stack Segment Register Symbolize

A

SS

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

In Registers Mnemonics, what does the Extra Segment Register Symbolize

A

ES

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

In Registers Mnemonics, what does the Flag Register Symbolize

A

F

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

What does the flag OF mean

A

Overflow

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

What does the flag DF mean

A

Direction

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

What does the flag SF mean

A

Sign

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

What does the flag IF mean

A

Interrupt

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

What does the flag ZF mean

A

Zero

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

What does the flag AF mean

A

Auxiliary Carry

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

What does the flag PF mean

A

Parity

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

What does the flag CF mean

A

Carry

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

What does the MOV instruction do?

A

Transfers a byte or word from source to destination.

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

An assembly program can be divided into three sections:

A

 The data section.
 The bss section.
 The text section.

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

section used for declaring initialized data or constants.

A

The Data Section

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

section used for declaring variables.

A

The bss section

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

section used for keeping the actual code.

A

The Text Section

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

The text section must begin with the declaration _____________, which tells the kernel where the
program execution begins.

A

global_start

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

Assembly language comments begins with a __________.

A

Semicolon (;)

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

Assembly language programs consists of three types of statements:

A

 Executable instructions or instructions
 Assembler directives or pseudo-ops
 Macros

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

Tells the assembler about the various aspects of the assembly process. These are non-executable and do not generate machine language
instructions.

A

Assembler Directives (Pseudo-Ops)

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

A text substitution mechanism.

A

Macros

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

Divides the system memory into groups of independent segments
referenced by pointers located in the segment registers.

A

A segmented memory model

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

It is represented by the ‘.data’ and ‘.bss’ sections.

A

Data Segment

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

Section that is used to declare the memory region, where the data elements are stored
for the program. This section cannot be expanded after the data elements are declared, and it remains static throughout the program.

A

Data Section

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

A static memory section that contains buffers for data to be declared
later in the program. This buffer memory is zero-filled.

A

bss Section

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

It is represented by the ‘.text’ section.

A

Code Segment

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

This defines and area in memory that stores the instruction codes.

A

Code Segment

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

This segment contains values passed to functions and procedures within the program.

A

Stack

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

How many processor registers are in IA-32 architecture.

A

There are ten 32-bit and six 16-bit processor registers

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

The Processor registers are grouped into three categories:

A

 General registers
 Control registers
 Segment registers

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

The general registers are further divided into the following groups:

A

 Data registers
 Pointer registers
 Index registers

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

What are the complete 32-bit data registers?

A

EAX, EBX, ECX, EDX.

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

it is used in indexed addressing.

A

BX

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

Used in input/output and most arithmetic instructions. For
example, in multiplication operation, one operand is stored in EAX, AX, or AL register according
to the size of the operand.

A

AX

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

Stores the loop count in iterative
operations.

A

CX

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

it is also used in input/output operations. It is also used with
the AX register along with DX for multiply and divide operations involving large values.

A

DX

69
Q

What are the 32-bit pointer registers?

A

EIP, ESP, and EBP registers

70
Q

Stores the offset address of the next
instruction to be executed. IP in association with the CS register (as CS:IP) gives the
complete address of the current instruction in the code segment.

A

Instruction Pointer (IP)

71
Q

Provides the offset value within the program
stack. SP in association with the SS register (as SS:SP) refers to be current position of
data or address within the program stack.

A

Stack Pointer (SP)

72
Q

Mainly helps in referencing the parameter
variables passed to a subroutine. The address in SS register is combined with the offset
BP to get the location of the parameter. BP can also be combined with DI and SI as base
register for special addressing.

A

Base Pointers (BP)

73
Q

it is used as source index for string operations.

A

Source Index

74
Q

it is used as destination index for string operations.

A

Destination Index

74
Q

It indicates the overflow of a high-order bit (leftmost bit) of data after a signed arithmetic operation.

A

OF

75
Q

It determines left or right direction for moving or
comparing string data. When the DF value is 0, the string
operation takes left-to-right direction and when the value
is set to 1, the string operation takes right-to-left direction.

A

DF

76
Q

It determines whether the external interrupts like
keyboard entry, etc., are to be ignored or processed. It
disables the external input when the value is 0 and enables
interrupts when set to 1.

A

IF

77
Q

It allows setting the operation of the processor in single-
step mode. The DEBUG program we used sets the trap
flag, so we could step through the execution one-by-one.

A

TF

78
Q

It shows the sign of the result of an arithmetic operation.
This flag is set according to the sign of a data item
following the arithmetic operation. A positive result clears
the value of SF to 0 and negative results sets it to 1.

A

SF

79
Q

It indicates the result of an arithmetic or comparison
operation. A nonzero result clears the zero flag to 0, and a
zero result sets it to 1.

A

ZF

80
Q

It indicates the total number of 1-bits in the result
obtained from an arithmetic operation. An even number of
1-bits clears the parity flag to 0 and an off number of 1-bits
sets the parity flag to 1.

A

PF

80
Q

It contains the carry from bit 3 to bit 4 following an
arithmetic operation; used for specialized arithmetic. The
AF is set when 1-byte arithmetic operation causes a carry
from bit 3 into bit 4.

A

AF

81
Q

It contains the carry of 0 or 1 from a high-order bit
(leftmost) after an arithmetic operation. It also stores the
contents of last bit of a shift or rotate operation.

A

CF

82
Q

It is the circuitry that controls the manipulation of data.

A

Central Processing Unit (CPU)

82
Q

CPU three main parts

A

 Arithmetic/Logic Unit – the circuit that perform the operations on the data.
 Control Unit – the circuits coordinating the activities of the CPU.
 Registers – quick, small stores of data withing the CPU.

82
Q

Three major characteristics of Von Neuman Architecture theoretical model:

A

Main Memory, Instructions, and
Input/Output.

83
Q

The circuits that perform the operations on data.

A

Arithmetic/Logic Unit

84
Q

The circuits coordinating the activities of the CPU.

A

Control Unit

85
Q

Quick, Small stores of data within the CPU

A

Registers

86
Q

Computers have a ________which provides timing signals to synchronize circuits.

A

System Clock

87
Q

The CPU needs a certain amount of _____________ per instruction.

A

clock ticks/cycles.

88
Q

The next instruction is retrieved by the CPU from main memory.

A

Fetch

88
Q

The instruction is broken down to its individual components to determine what the instruction is , and what data is being uised.

A

Decode

89
Q

The CU activates the necessary circuitry/ data transfers. The output of this stage is stored in a register, and data may be read/written from / to the main memory during this stage.

A

Execute

90
Q

Intel 4004 number of Transistors

A

2,300

90
Q

Intel 8086 number of Transistors

A

29,000

90
Q

Intel 8008 number of Transistors

A

3,500

90
Q

Intel 8080 number of Transistors

A

4,500

90
Q

Intel 8088 number of Transistors

A

29,000

90
Q

Intel 286 number of Transistors

A

134,000

91
Q

Intel 386 number of Transistors

A

275,000

92
Q

Intel 486 number of Transistors

A

1.2 Million

93
Q

Intel Pentium number of Transistors

A

3.1 million

94
Q

Intel Pentium Pro number of Transistors

A

5.5 Million

95
Q

Intel Pentium II number of Transistors

A

7.5 Million

96
Q

Intel Pentium Celeron number of Transistors

A

7.5 million

96
Q

Intel Pentium III number of Transistors

A

9.5 Million

97
Q

Intel Pentium 4 number of Transistors

A

42 Million

98
Q

Intel Xeon number of Transistors

A

42 Million

99
Q

Intel Pentium M number of Transistors

A

55 Million

100
Q

Intel Core Solo & Duo number of Transistors

A

151 Million

101
Q

Intel Core 2 number of Transistors

A

291 Million

102
Q

Intel Atom number of Transistors

A

47 Million

103
Q

Intel Core i7 number of Transistors

A

731 Million

104
Q

Intel Core i5 number of Transistors

A

774 Million

104
Q

Intel Core i3 number of Transistors

A

382 Million

105
Q

Intel Core i9 number of Transistors

A

Undisclosed

106
Q

These are very important in assembly
language, as the assembly language programs tend to be large in size.

A

Procedures or Subroutines

107
Q

The procedure is called from another function by using what instruction?

A

CALL

108
Q

The called procedure returns the control to the calling procedure by using what instruction?

A

RET

109
Q

What is an array-like data structure in the memory in which data can be stored and
removed from a location called the ‘top’?

A

Stack

110
Q

Stack is a ____ data structure

A

LIFO

111
Q

Assembly language provides two instructions for stack operations, which are:

A

PUSH and POP

112
Q

Registers used for implementing the stack.

A

SS and ESP (or SP)

113
Q

The top of the stack, which points to the last data item inserted into the stack is
pointed to by which register?

A

SS:ESP

114
Q

Which register points to the beginning
of the stack segment?

A

SS

115
Q

Which register gives the offset into the stack
segment?

A

SP (or ESP)

116
Q

T or F

Only words or doublewords could be saved into the stack.

A

True

117
Q

T or F

The stack grows in the reverse direction, i.e., toward the lower memory address.

A

True

118
Q

T or F

The top of the stack points to the last item inserted in the stack; it points to the lower byte of the last word inserted.

A

True

119
Q

What is a procedure that calls itself?

A

Recursive Procedure

120
Q

There are two kind of recursion:

A

Direct and Indirect

121
Q

In _______ recursion, the procedure calls itself

A

Direct

122
Q

In _______ recursion, the first
procedure calls a second procedure, which in turn calls the first procedure.

A

Indirect

123
Q

Writing a ________ is another way of ensuring modular programming in assembly language.

A

Macro

124
Q

It is is a sequence of instructions, assigned by a name and could be used anywhere in
the program.

A

Macro

125
Q

in NASM, macros are defined with _______ and ______ directives

A

%macro and %endmacro

126
Q

The macro is invoked by using what?

A

macro name and parameters

126
Q

T or F

The system considers any input or output data as stream of bytes.

A

True

127
Q

There are three standard file streams, which are:

A
  • Standard input (stdin),
  • Standard output (stdout), and
  • Standard error (stderr).
127
Q

It is a 16-bit integer assigned to a file as a file id. When a new file is created or an existing file is opened, the It is used for accessing the file.

A

File Descriptor

128
Q

T or F

File descriptor of the standard file streams - stdin, stdout and stderr are 0, 1 and 2,
respectively.

A

True

129
Q

It specifies the location for a subsequent read/write operation in the file in terms
of bytes.

A

File Pointer

130
Q

T or F

Each file is considered as a sequence of words.

A

False (Bytes)

131
Q

T or F

Each open file is associated with a
file pointer that specifies an offset in bytes, relative to the beginning of the file.

A

True

131
Q

T or F

When a file is opened, the file pointer is set to null.

A

False (Zero)

132
Q

In file handling what is the name of the system call %eax 2?

A

sys_fork

133
Q

In file handling what is the name of the system call %eax 3?

A

sys_read

134
Q

In file handling what is the name of the system call %eax 4?

A

sys_write

135
Q

In file handling what is the name of the system call %eax 5?

A

sys_open

136
Q

In file handling what is the name of the system call %eax 6?

A

sys_close

137
Q

In file handling what is the name of the system call %eax 8?

A

sys_creat

138
Q

In file handling what is the name of the system call %eax 16?

A

sys_lseek

139
Q

Which system call is provided by the kernel, to allocate memory without the need of
moving it later.

A

sys_brk()

140
Q

In case of any error, sys_brk() returns _____ or _______

A

-1 or the negative error code itself

141
Q

This call allocates memory right behind the application image in the
memory.

A

sys_brk()

141
Q

T or F

sys_brk() allows you to set the highest available address in the data
section.

A

True

142
Q

What law does this imply in the laws of Boolean Algebra?

A Ʌ 0 = 0
A V 1 = 1

A

Annulment Law

143
Q

What law does this imply in the laws of Boolean Algebra?

A Ʌ 1 = A
A V 0 = A

A

Identity Law

144
Q

What law does this imply in the laws of Boolean Algebra?

A V A = A
A Ʌ A = A

A

Idempotent Law

145
Q

What law does this imply in the laws of Boolean Algebra?

A V -A = 1
A Ʌ -A = 0

A

Complement Law

146
Q

What law does this imply in the laws of Boolean Algebra?

-(-A) = A

A

Double Negation Law

147
Q

What law does this imply in the laws of Boolean Algebra?

(A V B) V C = A V (B V C)
(A Ʌ B) Ʌ C = A Ʌ (B Ʌ C)

A

Associative

148
Q

What law does this imply in the laws of Boolean Algebra?

A V B = B V A
A Ʌ B = B Ʌ A

A

Commutative

149
Q

What law does this imply in the laws of Boolean Algebra?

A V (A Ʌ B) = A
A Ʌ (A V B) = A

A

Absorptive

149
Q

What law does this imply in the laws of Boolean Algebra?

A Ʌ (B V C) = (A Ʌ B) V (A Ʌ C)
A V (B Ʌ C) = (A V B) Ʌ (A V C)

A

Distributive

150
Q

What law does this imply in the laws of Boolean Algebra?

-(A Ʌ B) = -A V -B
-(A V B) = -A Ʌ -B

A

De Morgan’s Law

151
Q

What are electronic circuits that manipulate voltages. They manipulate the binary 1s and 0s which are moving around inside your computer.

A

Logic Gates

152
Q

Symbol for a transistor

A

Yung Bilog

153
Q

Symbol for a resistor

A

Yung Parihaba

154
Q

A Boolean operator with only one variable that has the value one when the variable is zero and vice versa.

A

NOT GATE (Triangle Symbol)

155
Q

Only output 1 if both inputs are 1

A

AND GATE (Bullet Symbol)

156
Q

Outputs one if one of the inputs are 1

A

OR GATE (Shark Fin Symbol)

157
Q

Can you combine logic gates?

A

Yes