Pre-study: Comp architecture | Assembly Lang (x86) Flashcards

1
Q

whereas utilization happens to be the attribute of organization
now a generic computer is comprised of various functional units
amongst them the processor is the most important one

A

the processor itself is a collection of register section and arithmetic and
logic unit also known as alu and a timing and
control unit along with these it also has another
section called interface

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

processor

A

the brain of the system

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

memory

A

stores all
the instructions reading ways the processor works
accordingly also we can store data inside the memory another
functional unit is the input output peripheral
now the term peripheral is just a fancy version of device
all of these are very essential when computation involving computers
are concerned so the programs or the set of instructions are stored into the
memory using input devices so that the
processor can execute them during execution the required inputs can
either be fed into the system using the same input peripherals or
stored into the memory beforehand

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

outputs can be generated onto the output devices or else can be
stored into the _________________________________________.

A

memory for later extraction the
intercommunication of all these functional components is
carried out with the help of system bus

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

two predominant approaches to the architecture that influence how computer processors function.

A

Complex instruction set computer (CISC) and reduced instruction set computer (RISC)

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

CISC

A

processors have one processing unit, auxiliary memory, and a tiny register set containing hundreds of unique commands. These processors execute a task with a single instruction, making a programmer’s work simpler since fewer lines of code are required to complete the operation. This method utilizes less memory but may need more time to execute instructions.

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

A reassessment led to the creation of high-performance computers based on the _____ architecture. The hardware is designed to be as basic and swift as possible, and sophisticated instructions can be executed with simpler ones.

A

RISC

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

Purpose of computer architecture

A

Everything a system performs, from online surfing to printing, involves the transmission and processing of numbers. A computer’s architecture is merely a mathematical system intended to collect, transmit, and interpret numbers.

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

Data in numbers

A

The computer stores all data as numerals. When a developer is engrossed in machine learning code and analyzing sophisticated algorithms and data structures, it is easy to forget this.

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

Manipulating data

A

The computer manages information using numerical operations. It is possible to display an image on a screen by transferring a matrix of digits to the video memory, with every number reflecting a pixel of color.

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

Multifaceted functions

A

The components of a computer architecture include both software and hardware. The processor — hardware that executes computer programs — is the primary part of any computer.

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

Booting up

A

At the most elementary level of a computer design, programs are executed by the processor whenever the computer is switched on. These programs configure the computer’s proper functioning and initialize the different hardware sub-components to a known state. This software is known as firmware since it is persistently preserved in the computer’s memory.

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

Support for temporary storage

A

Memory is also a vital component of computer architecture, with several types often present in a single system. The memory is used to hold programs (applications) while they are being executed by the processor and the data being processed by the programs.

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

support for permanent storage

A

There can also be tools for storing data or sending information to the external world as part of the computer system. These provide text inputs through the keyboard, the presentation of knowledge on a monitor, and the transfer of programs and data from or to a disc drive.

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

User-facing functionality

A

Software governs the operation and functioning of a computer. Several software ‘layers’ exist in computer architecture. Typically, a layer would only interface with layers below or above it.

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

Depending on the method of categorization, the parts of a computer architecture can be subdivided in several ways. The main components of a computer architecture are the CPU, memory, and peripherals. All these elements are linked by the system bus, which comprises an address bus, a data bus, and a control bus. Within this framework, the computer architecture has eight key components

A
  • Input unit and associated peripherials
  • Output unit and associted peripherals
  • Storage unit/ memory
  • Central Processing Unit (CPU)
  • Operating system (OS)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Input unit and associated peripherals

A

The input unit provides external data sources to the computer system. Therefore, it connects the external environment to the computer. It receives information from input devices, translates it to machine language, and then inserts it within the computer system. The keyboard, mouse, or other input devices are the most often utilized and have corresponding hardware drivers that allow them to work in sync with the rest of the computer architecture.

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

Output unit and associated peripherals

A

The output unit delivers the computer process’s results to the user. A majority of the output data comprises music, graphics, or video. A computer architecture’s output devices encompass the display, printing unit, speakers, headphones, etc.

To play an MP3 file, for instance, the system reads a number array from the disc and into memory. The computer architecture manipulates these numbers to convert compressed audio data to uncompressed audio data and then outputs the resulting set of numbers (uncompressed audio file) to the audio chips. The chip then makes it user-ready through the output unit and associated peripherals.

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

Storage unit/memory

A

The storage unit contains numerous computer parts that are employed to store data. It is typically separated into primary storage and secondary storage.

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

RAM

A

supplies the necessary information straight to the CPU. It is a temporary memory that stores data and instructions intermittently.

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

ROM

A

memory type that contains pre-installed instructions, including firmware. This memory’s content is persistent and cannot be modified. ROM is utilized to boot the machine upon initial startup. The computer is now unaware of anything outside the ROM. The chip instructs it on how to set up the computer architecture, conduct a power-on self-test (POST), and finally locate the hard drive so that the operating system can be launched.

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

Secondary storage unit

A

inaccessible directly to the CPU. Before the CPU uses secondary storage data, it must be transferred to the main storage. Secondary storage permanently retains vast amounts of data. Examples include hard disk drives (HDDs), solid-state drives (SSDs), compact disks (CDs), etc.

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

CPU

A

includes registers, an arithmetic logic unit (ALU), and control circuits, which interpret and execute assembly language instructions. The CPU interacts with all the other parts of the computer architecture to make sense of the data and deliver the necessary output.

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

Registers

A

These are high-speed and purpose-built temporary memory devices. Rather than being referred to by their address, they are accessed and modified directly by the CPU throughout execution. Essentially, they contain data that the CPU is presently processing. Registers contain information, commands, addresses, and intermediate processing results.

25
Q

ALU

A

The arithmetic logic unit includes the electrical circuitry that performs any arithmetic and logical processes on the supplied data. It is used to execute all arithmetic (additions, subtractions, multiplication, division) and logical (<, >, AND, OR, etc.) computations. Registers are used by the ALU to retain the data being processed.

26
Q

Control Unit

A

The control unit collaborates with the computer’s input and output devices. It instructs the computer to execute stored program instructions via communication with the ALU and registers. The control unit aims to arrange data and instruction processing.

The microprocessor is the primary component of computer hardware that runs the CPU. Large printed circuit boards (PCBs) are utilized in all electronic systems, including desktops, calculators, and internet of things (IoT) devices. The Intel 40004 was the first microprocessor with all CPU components on a single chip.

In addition to these four core components, a computer architecture also has supporting elements that make it easier to function, such as:

27
Q

Bootloader

A

The firmware contains the bootloader, a specific program executed by the processor that retrieves the operating system from the disc (or non-volatile memory or network interface, as deemed applicable) and loads it into the memory so that the processor can execute it. The bootloader is found on desktop and workstation computers and embedded devices. It is essential for all computer architectures.

28
Q

Operating system (OS)

A

The operating system governs the computer’s functionality just above firmware. It manages memory usage and regulates devices such as the keyboard, mouse, display, and disc drives. The OS also provides the user with an interface, allowing them to launch apps and access data on the drive.

Typically, the operating system offers a set of tools for programs, allowing them to access the screen, disc drives, and other elements of the computer’s architecture.

29
Q

Buses

A

A bus is a tangible collection of signal lines with a linked purpose; a good example is the universal serial bus (USB). Buses enable the flow of electrical impulses between various components of a computer’s design, transferring information from one system to another. The size of a bus is the count of information-transferring signal lines. A bus with a size of 8 bits, for instance, transports 8 data bits in a parallel formation.

30
Q

Interrupts

A

Interrupts, also known as traps or exceptions in certain processors, are a method for redirecting the processor from the running of the current program so that it can handle an occurrence. Such an event might be a malfunction from a peripheral or just the fact that an I/O device has completed its previous duty and is presently ready for another one. Every time you press a key and click a mouse button, your system will generate an interrupt.

31
Q

Types of Computer Architecture

A
  • ISA
  • microarchitecture
  • Client-server architecture
  • Single instruction, multiple data (SIMD) architecture
  • Multicore architecture
32
Q

Instruction set architecture (ISA) is a bridge between the software and hardware of a computer. It functions as a programmer’s viewpoint on a machine. Computers can only comprehend binary language (0 and 1), but humans can comprehend high-level language (if-else, while, conditions, and the like).

A

Consequently, ISA plays a crucial role in user-computer communications by translating high-level language into binary language.

33
Q

ISA outlines the architecture of a computer in terms of the fundamental activities it must support. It’s not involved with implementation-specific computer features. Instruction set architecture dictates that the computer must assist:

A

Arithmetic/logic instructions: These instructions execute various mathematical or logical processing elements solely on a single or maybe more operands (data inputs).

Data transfer instructions: These instructions move commands from the memory or into the processor registers, or vice versa.

Branch and jump instructions: These instructions are essential to interrupt the logical sequence of instructions and jump to other destinations.

34
Q

Microarchitecture

A

Microarchitecture, unlike ISA, focuses on the implementation of how instructions will be executed at a lower level. This is influenced by the microprocessor’s structural design.

Microarchitecture is a technique in which the instruction set architecture incorporates a processor. Engineering specialists and hardware scientists execute ISA with various microarchitectures that vary according to the development of new technologies. Therefore, processors may be physically designed to execute a certain instruction set without modifying the ISA.

Simply put, microarchitecture is the purpose-built logical arrangement of the microprocessor’s electrical components and data pathways. It facilitates the optimum execution of instructions.

35
Q

Client-server architecture

A

Multiple clients (remote processors) may request and get services from a single, centralized server in a client-server system (host computer). Client computers allow users to request services from the server and receive the server’s reply. Servers receive and react to client inquiries.

A server should provide clients with a standardized, transparent interface so that they are unaware of the system’s features (software and hardware components) that are used to provide the service.

Clients are often located on desktops or laptops, while servers are typically located somewhere else on the network, on more powerful hardware. This computer architecture is most efficient when the clients and the servers frequently perform pre-specified responsibilities.

36
Q

Single insttruction, multiple data (SIMD) architecture

A

Single instruction, multiple data (SIMD) computer systems can process multiple data points concurrently. This cleared the path for supercomputers and other devices with incredible performance capabilities. In this form of design, all processors receive an identical command from the control unit yet operate on distinct data packets. The shared memory unit requires numerous modules to interact with all CPUs concurrently.

37
Q

Multicore architecture

A

Multicore is a framework wherein a single physical processor has the logic of multiple processors. A multicore architecture integrates numerous processing cores onto only one integrated circuit. The goal is to develop a system capable of doing more tasks concurrently, improving overall system performance.

38
Q

The von Neumann architecture, often referred to as the Princeton architecture, is a computer architecture that was established in a 1945 presentation by John von Neumann and his collaborators in the First Draft of a Report on the EDVAC (electronic discrete variable automatic computer). This example of computer architecture proposes five components:

A

A processor with connected registers

A control unit capable of storing instructions

Memory capable of storing information as well as instructions and communicating via buses

Additional or external storage

Device input as well as output mechanisms

39
Q

Harvard Architecture

A

The Harvard architecture refers to a computer architecture with distinct data and instruction storage and signal pathways. In contrast to the von Neumann architecture, in which program instructions and data use the very same memory and pathways, this design separates the two. In practice, a customized Harvard architecture with two distinct caches is employed (for data and instruction); X86 and Advanced RISC Machine (ARM) systems frequently employ this instruction.

40
Q

You can declare static data regions (analogous to global variables) in x86 assembly using special assembler directives for this purpose.

A

Data declarations should be preceded by the .DATA directive.

41
Q

the directives DB, DW, and DD can be used to declare one, two, and four byte data locations, respectively. Declared locations can be labeled with names for later reference — this is similar to declaring variables by ______, but abides by some lower level rules. For example, locations declared in sequence will be located in memory _____ to one another.

A

name
next

42
Q

.DATA
var DB 64

A

Declare a byte, referred to as location var, containing the value 64.

43
Q

var2 DB ?
DB 10

A

Declare an uninitialized byte, referred to as location var2.

Declare a byte with no label, containing the value 10. Its location is var2 + 1.

44
Q

X DW ?

A

Declare a 2-byte uninitialized value, referred to as location X.

45
Q

Y DD 30000

A

Declare a 4-byte value, referred to as location Y, initialized to 30000.

46
Q

Unlike in high level languages where arrays can have many dimensions and are accessed by indices, arrays in x86 assembly language are simply a number of cells located contiguously in memory.

A

An array can be declared by just listing the values

47
Q

common methods used for declaring arrays of data are the DUP directive and the use of string literals. The DUP directive tells the assembler to duplicate an expression a given number of times. For example, 4 DUP(2) is equivalent to

A

2, 2, 2, 2

48
Q

Declaration:
Z DD 1, 2, 3

A

Declare three 4-byte values, initialized to 1, 2, and 3. The value of location Z + 8 will be 3.

49
Q

bytes DB 10 DUP(?)

A

Declare 10 uninitialized bytes starting at location bytes.

50
Q

arr
DD 100
DUP(0)

A

Declare 100 4-byte words starting at location arr, all initialized to 0

51
Q

str DB ‘hello’, 0

A

Declare 6 bytes starting at the address str, initialized to the ASCII character values for hello and the null (0) byte.

52
Q

Modern x86-compatible processors are capable of addressing up to 2^32 bytes of memory: memory addresses are 32-bits wide.
we used labels to refer to memory regions, these labels are actually replaced by the assembler with 32-bit quantities that specify addresses in memory. In addition to supporting referring to memory regions by labels (i.e. constant values), the x86 provides a flexible scheme for computing and referring to memory addresses:

A

up to two of the 32-bit registers and a 32-bit signed constant can be added together to compute a memory address. One of the registers can be optionally pre-multiplied by 2, 4, or 8.

53
Q

stack

A

LIFO data structure

an array

stack pointer

54
Q

This instruction has two operands: the first is the destination and the second specifies the source.

A

mov instruction

55
Q

mov instructions using address computations:

        mov eax, [ebx]
A

Move the 4 bytes in memory at the address contained in EBX into EAX

56
Q

mov instructions using address computations:

        mov [var], ebx
A

Move the contents of EBX into the 4 bytes at memory address var. (Note, var is a 32-bit constant).

57
Q

mov instructions using address computations:

        mov eax, [esi-4]
A

Move 4 bytes at memory address ESI + (-4) into EAX

58
Q

mov instructions using address computations:

        mov [es9+eax], cl
        mov edx,
       [esi+4**ebx]
A

Move the contents of CL into the byte at address ESI+EAX

Move the 4 bytes of data at address ESI+4*EBX into EDX

59
Q

Some examples of invalid address calculations include:

A

mov eax, [ebx-ecx]
; Can only add register values

mov [eax+esi+edi], ebx
; At most 2 registers in address computation