CS 401 Quiz 3 - 2021

 CS 401 Quiz 3 - 2021




CS401 Assembly Programming Language short Lectures | Computer Architecture, Registers, Computer bus.

CS402 Short Lecture 1 ":Topics outline

• Programming language 

• High level and low level

• Machine and assembly are low level 



• The aim of programming in assembly language is to bypass these intermediates and talk directly with the computer.



introduction

• There is a general impression that assembly language programming is a difficult chore and not everyone is capable enough to understand it. The reality is in contrast, as assembly language is a very simple subject. 

• The wrong impression is created because it is very difficult to realize that the real computer can be so simple. 

• It is not being taught as the first programming . Hence we find it difficult and boring. 

introduction

• AND, OR , NOT logical operators

• Binary numbers and their arithmetic

• Useful in time critical systems called real time systems. Real time systems have time bound responses, with an upper limit of time on certain operations.

• Produce fine grained logic in programmers

Today’s topics

• BASIC COMPUTER ARCHITECTURE

• Address, Data, and Control Buses

• REGISTERS

• INSTRUCTION GROUPS



Basic Computer Architecture

• Computer buses

– Data bus 

– Control bus 

– Address bus


Compute memory

• N-bit array 

• A memory cell is an n-bit location to store data, normally 8-bit also

called a byte. The number of bits in a cell is called the cell width.


registers

• Temporary storage places inside the processor called registers.

• Their operation is very much like normal memory cells.

• Registers are relatively very small in number.

Type of Registers

• Some manufacturers number their registers like r0, r1, r2, others name them like A, B, C, D. it’s called  nomenclature.

• Accumulator: There is a central register in every processor called the accumulator. Traditionally all mathematical and logical operations are performed on the accumulator. The word size of a processor is defined by the width of its accumulator. A 32bit processor has an accumulator of 32 bits.

Type of Registers

• Pointer, Index, or Base Register : The name varies from manufacturer to manufacturer, but the basic distinguishing property is that it does not hold data but holds the address of data.

• Index register is used in such a situation to hold the address of the current array location. (LOOP)


Type of Registers

• Pointer, Index, or Base Register : The name varies from manufacturer to manufacturer, but the basic distinguishing property is that it does not hold data but holds the address of data.

• Index register is used in such a situation to hold the address of the current array location. (LOOP)

• In newer architectures the distinction between accumulator and index registers has become vague. They have general registers which are more versatile and can do both functions.


Type of Registers

• Flags Register or Program Status Word: This is a special register in every architecture called the flags register or the program status word. Like the accumulator it is an 8, 16, or 32 bits register but unlike the accumulator it is meaningless as a unit, rather the individual bits carry different meanings. 

• The bits of the flags register work independently and individually, and combined its value is meaningless.

Type of Registers

• Program Counter or Instruction Pointer: Everything (data, memory, instruction) must translate into a binary number for our dumb processor to understand it. Therefore the instructions themselves must be translated into numbers. For example to add numbers we understand the word “add.” 

• A program is defined to be “an ordered set of instructions.” A special register exists in every processor called the program counter or the instruction pointer that ensures this ordering. “The program counter holds the address of the next instruction to be executed.”

Comments