SlideShare a Scribd company logo
1 of 40
Programming The Basic Computer
Unit-2
Programming Basic Computer The list of
instructions or statements that directs
the computer hardware to perform specific task is
called a program. There are
many programming languages
but,the computer basically understands programs
that are given in binary (0s, 1s) form
Those concerned with computer architecture should
have a knowledge of both hardware and software
because the two branches influence each other
Instruction Set of the Basic Computer
MACHINE LANGUAGE
 Program
A list of instructions or statements for directing
the computer to perform a required data
processing task
Various types of programming languages
- Hierarchy of programming languages
• Machine-language
- Binary code
- Octal or hexadecimal code
• Assembly-language (Assembler)
- Symbolic code
• High-level language (Compiler)
COMPARISON OF PROGRAMMING
LANGUAGES
ASSEMBLY LANGUAGE
Syntax of the Basic Computer assembly language
Each line is arranged in three columns called
fields
Label field
- May be empty or may specify a symbolic
Address consists of up to 3 characters
- Terminated by a comma
Instruction field
- Specifies a machine or a pseudo instruction
- May specify one of
* Memory reference instr. (MRI)
MRI consists of two or three symbols separated by
spaces.
ADD OPR (direct address MRI)
ADD PTR I (indirect address MRI)
 Register reference or input-output instr.
Non-MRI does not have an address part
* Pseudo instr. with or without an operand
Symbolic address used in the instruction field
must be
defined somewhere as a label
Comment field
- May be empty or may include a comment
TRANSLATION TO BINARY
PROGRAM LOOPS
PROGRAMMING ARITHMETIC AND LOGIC
OPERATIONS
Implementation of Arithmetic and Logic Operations
- Software Implementation
- Implementation of an operation with a program
using machine instruction set
- Usually when the operation is not included
in the instruction set
- Hardware Implementation
- Implementation of an operation in a computer
with one machine instruction
Software Implementation example:
* Multiplication
- For simplicity, unsigned positive numbers
- 8-bit numbers -> 16-bit product
- Logic and Shift Operations -
SUBROUTINES
INPUT OUTPUT PROGRAM
Micro programmed Control
 Hardwired Control Unit: When the control signals
are generated by hardware using conventional logic
design techniques, the control unit is said to be
hardwired.
 Micro programmed control unit: A control unit
whose binary control variables are stored in memory
is called a micro programmed control unit.
 Control Memory: Control Memory is the storage in
the microprogrammed control unit to store the
microprogram.
 Writeable Control Memory: Control Storage whose
contents can be modified, allow the change in
microprogram and Instruction set can be changed or
modified is referred as Writeable Control Memory.
 Control Word: The control variables at any given
time can be represented by a control word string of 1
's and 0's called a control word.
Micro-operation, Micro-instruction,
Micro program, Microcode
 Microoperations: In computer central processing
units, micro-operations (also known as a micro-
ops or μops) are detailed low-level instructions
used in some designs to implement complex
machine instructions (sometimes termed macro-
instructions in this context).
Micro instruction:
 A symbolic microprogram can be translated into its
binary equivalent by means of an assembler.
 Each line of the assembly language microprogram
defines a symbolic microinstruction.
 Each symbolic microinstruction is divided into five
fields: label, microoperations, CD, BR, and AD
Micro program:
 A sequence of microinstructions constitutes a
microprogram.
 Since alterations of the microprogram are not
needed once the control unit is in operation, the
control memory can be a read-only memory (ROM).
 ROM words are made permanent during the
hardware production of the unit.
 The use of a micro program involves placing all
control variables in words of ROM for use by the
control unit through successive read operations.
 The content of the word in ROM at a given address
specifies a microinstruction.
Microcode:
 Microinstructions can be saved by employing
subroutines that use common sections of microcode.
 For example, the sequence of micro operations
needed to generate the effective address of the
operand for an instruction is common to all memory
reference instructions.
 This sequence could be a subroutine that is called
from within many other routines to execute the
effective address computation.
Organization of micro programmed
control unit
 The general configuration of a micro-
programmed control unit is demonstrated in the
block diagram of Figure
 The control memory is assumed to be a ROM,
within which all control information is
permanently stored.
 The control memory address register specifies the
address of the microinstruction, and the control data
register holds the microinstruction read from
memory.
 The microinstruction contains a control word that
specifies one or more microoperations for the data
processor. Once these operations are executed, the
control must determine the next address.
 The location of the next microinstruction may be the
one next in sequence, or it may be located
somewhere else in the control memory.
 While the microoperations are being executed, the
next address is computed in the next address
generator circuit and then transferred into the control
address register to read the next microinstruction.
 Thus a microinstruction contains bits for initiating
microoperations in the data processor part and bits
that determine the address sequence for the control
memory.
 The next address generator is sometimes called a
micro-program sequencer, as it determines the
address sequence that is read from control memory.
 Typical functions of a micro-program sequencer are
incrementing the control address register by one,
loading into the control address register an address
from control memory,transferring an external
address, or loading an initial address to start the
control operations.
 The control data register holds the present
microinstruction while the next address is computed
and read from memory.
 The data register is sometimes called a pipeline
register.
 It allows the execution of the microoperations
specified by the control word simultaneously with the
generation of the next microinstruction.
 This configuration requires a two-phase clock, with
one clock applied to the address register and the
other to the data register.
 The main advantage of the micro programmed
control is the fact that once the hardware
configuration is established; there should be no need
for further hardware or wiring changes.
 If we want to establish a different control sequence
for the system, all we need to do is specify a
Address Sequencing
Microinstructions are stored in control memory in
groups, with each group specifying a routine.
To appreciate the address sequencing in a micro-
program control unit, let us specify the steps that the
control must undergo during the execution of a single
computer instruction.
Step-1:
 An initial address is loaded into the control address
register when power is turned on in the computer.
 This address is usually the address of the first
microinstruction that activates the instruction fetch
routine.
 The fetch routine may be sequenced by
incrementing the control address register through the
rest of its microinstructions.
 At the end of the fetch routine, the instruction is in
the instruction register of the computer.
Step-2:
 The control memory next must go through the
routine that determines the effective address of the
operand.
 A machine instruction may have bits that specify
various addressing modes, such as indirect address
and index registers.
 The effective address computation routine in control
memory can be reached through a branch
microinstruction, which is conditioned on the status
of the mode bits of the instruction.
 When the effective address computation routine is
completed, the address of the operand is available in
the memory address register.
Step-3:
 The next step is to generate the microoperations
that execute the instruction fetched from memory.
 The microoperation steps to be generated in
processor registers depend on the operation code
part of the instruction.
 Each instruction has its own micro-program routine
stored in a given location of control memory.
 The transformation from the instruction code bits to
an address in control memory where the routine is
located is referred to as a mapping process.
 A mapping procedure is a rule that transforms the
instruction code into a control memory address.
Step-4:
 Once the required routine is reached, the
microinstructions that execute the instruction may be
sequenced by incrementing the control address
register.
 Micro-programs that employ subroutines will require
an external register for storing the return address.
 Return addresses cannot be stored in ROM because
the unit has no writing capability.
 When the execution of the instruction is completed,
control must return to the fetch routine.
 This is accomplished by executing an unconditional
branch microinstruction to the first address of the
fetch routine.
Summary: the address sequencing
capabilities required in a control memory
are:
1. Incrementing of the control address register.
2. Unconditional branch or conditional branch,
depending on status bit conditions.
3. A mapping process from the bits of the instruction to
an address for control memory.
4. A facility for subroutine call and return.
Selection of address for control memory
Above figure shows a block diagram of a control memory and the associated
hardware needed for selecting the next microinstruction address.
 The microinstruction in control memory contains a set of
bits to initiate microoperations in computer registers and
other bits to specify the method by which the next
address is obtained.
 The diagram shows four different paths from which the
control address register (CAR) receives the address.
 The incrementer increments the content of the control
address register by one, to select the next
microinstruction in sequence.
 Branching is achieved by specifying the branch address
in one of the fields of the microinstruction.
 Conditional branching is obtained by using part of the
microinstruction to select a specific status bit in order to
determine its condition.
 An external address is transferred into control memory
via a mapping logic circuit.
 The return address for a subroutine is stored in a special
register whose value is then used when the micro-
program wishes to return from the subroutine.
 The branch logic of figure provides decision-making
capabilities in the control unit.
 The status conditions are special bits in the system
that provide parameter information such as the
carry-out of an adder, the sign bit of a number, the
mode bits of an instruction,and input or output status
conditions.
 The status bits, together with the field in the
microinstruction that specifies a branch address,
control the conditional branch decisions generated in
the branch logic.
 A 1 output in the multiplexer generates a control
signal to transfer the branch address from the
microinstruction into the control address register.
 A 0 output in the multiplexer causes the address
register to be incremented.
Mapping of an Instruction
 A special type of branch exists when a microinstruction specifies a branch to the first
word in control memory where a microprogram routine for an instruction is located.
 The status bits for this type of branch are the bits in the operation code part of the
Instruction.For example, a computer with a simple instruction format as shown in
figure belowhas an operation code of four bits which can specify up to 16 distinct
instructions.
 Assume further that the control memory has 128 words, requiring an address of seven
bits.
 One simple mapping process that converts the 4-bit operation code to a 7-bit address
for
 control memory is shown in figure below.
 This mapping consists of placing a 0 in the most significant bit of the address,
transferring the four operation code bits, and clearing the two least significant bits of
the control address register.
 This provides for each computer instruction a microprogram routine with a capacity of
 four microinstructions.
 If the routine needs more than four microinstructions, it can use addresses 1000000
through 1111111. If it uses fewer than four microinstructions, the unused memory
locations would be available for other routines.
microinstruction
address
•One can extend this concept to a more general mapping rule by using a ROM
to specify the mapping function.
•The contents of the mapping ROM give the bits for the control address
register.
•In this way the microprogram routine that executes the instruction can be
placed in any desired location in control memory.
•The mapping concept provides flexibility for adding instructions for control
memory as the need arises.
 A Hard-wired Control consists of two decoders, a
sequence counter, and a number of logic gates.
 An instruction fetched from the memory unit is placed in
the instruction register (IR).
 The component of an instruction register includes; I bit,
the operation code, and bits 0 through 11.
 The operation code in bits 12 through 14 are coded with
a 3 x 8 decoder.
 The outputs of the decoder are designated by the
symbols D0 through D7.
 The operation code at bit 15 is transferred to a flip-flop
designated by the symbol I.
 The operation codes from Bits 0 through 11 are applied
to the control logic gates.
 The Sequence counter (SC) can count in binary from 0
through 15.
 The Control memory address register specifies the address of the
micro-instruction.
 The Control memory is assumed to be a ROM, within which all
control information is permanently stored.
 The control register holds the microinstruction fetched from the
memory.
 The micro-instruction contains a control word that specifies one or
more micro-operations for the data processor.
 While the micro-operations are being executed, the next address is
computed in the next address generator circuit and then transferred
into the control address register to read the next microinstruction.
 The next address generator is often referred to as a micro-program
sequencer, as it determines the address sequence that is read from
control memory.

More Related Content

What's hot

Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3Mujaheed Sulantingan
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnectionSajid Marwat
 
Report in SAD
Report in SADReport in SAD
Report in SADjesseledm
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектурMuuluu
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5Umang Gupta
 
Data Manipulation
Data ManipulationData Manipulation
Data ManipulationAsfi Bhai
 
COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5Dr.MAYA NAYAK
 
COMPUTER ORGANIZATION NOTES Unit 3 4
COMPUTER ORGANIZATION NOTES  Unit 3 4COMPUTER ORGANIZATION NOTES  Unit 3 4
COMPUTER ORGANIZATION NOTES Unit 3 4Dr.MAYA NAYAK
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESDr.MAYA NAYAK
 
Input output in computer Orgranization and architecture
Input output in computer Orgranization and architectureInput output in computer Orgranization and architecture
Input output in computer Orgranization and architecturevikram patel
 
Computer organization basics and number systems
Computer organization basics and number systemsComputer organization basics and number systems
Computer organization basics and number systemsPrasenjit Dey
 

What's hot (20)

Unit 2
Unit 2Unit 2
Unit 2
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
 
Report in SAD
Report in SADReport in SAD
Report in SAD
 
03 Buses
03 Buses03 Buses
03 Buses
 
Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектур
 
Ec305.13 buses mgl
Ec305.13 buses mglEc305.13 buses mgl
Ec305.13 buses mgl
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5COMPUTER ORGANIZATION NOTES Unit 5
COMPUTER ORGANIZATION NOTES Unit 5
 
COMPUTER ORGANIZATION NOTES Unit 3 4
COMPUTER ORGANIZATION NOTES  Unit 3 4COMPUTER ORGANIZATION NOTES  Unit 3 4
COMPUTER ORGANIZATION NOTES Unit 3 4
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTES
 
Input output in computer Orgranization and architecture
Input output in computer Orgranization and architectureInput output in computer Orgranization and architecture
Input output in computer Orgranization and architecture
 
07 Input Output
07  Input  Output07  Input  Output
07 Input Output
 
Processor Basics
Processor BasicsProcessor Basics
Processor Basics
 
Computer organization basics and number systems
Computer organization basics and number systemsComputer organization basics and number systems
Computer organization basics and number systems
 

Similar to Unit 2

chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnnchapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnnNineTo1
 
CS304PC:Computer Organization and Architecture UNIT II .pdf
CS304PC:Computer Organization and Architecture UNIT II .pdfCS304PC:Computer Organization and Architecture UNIT II .pdf
CS304PC:Computer Organization and Architecture UNIT II .pdfAsst.prof M.Gokilavani
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitabdosaidgkv
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulationjanani thirupathi
 
Datatransferandmanipulation 180214044522
Datatransferandmanipulation 180214044522Datatransferandmanipulation 180214044522
Datatransferandmanipulation 180214044522kirupasuchi1996
 
CS304PC:Computer Organization and Architecture Session 7 Microprogrammed con...
CS304PC:Computer Organization and Architecture  Session 7 Microprogrammed con...CS304PC:Computer Organization and Architecture  Session 7 Microprogrammed con...
CS304PC:Computer Organization and Architecture Session 7 Microprogrammed con...Asst.prof M.Gokilavani
 
conrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxconrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxjbri1395
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed controlShashank Singh
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)guptakrishns23
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit ISaranya1702
 
16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)Susam Pal
 

Similar to Unit 2 (20)

unit-3.pdf
unit-3.pdfunit-3.pdf
unit-3.pdf
 
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnnchapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
CS304PC:Computer Organization and Architecture UNIT II .pdf
CS304PC:Computer Organization and Architecture UNIT II .pdfCS304PC:Computer Organization and Architecture UNIT II .pdf
CS304PC:Computer Organization and Architecture UNIT II .pdf
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Datatransferandmanipulation 180214044522
Datatransferandmanipulation 180214044522Datatransferandmanipulation 180214044522
Datatransferandmanipulation 180214044522
 
Unit 3 CO.pptx
Unit 3 CO.pptxUnit 3 CO.pptx
Unit 3 CO.pptx
 
Control Memory.pptx
Control Memory.pptxControl Memory.pptx
Control Memory.pptx
 
CS304PC:Computer Organization and Architecture Session 7 Microprogrammed con...
CS304PC:Computer Organization and Architecture  Session 7 Microprogrammed con...CS304PC:Computer Organization and Architecture  Session 7 Microprogrammed con...
CS304PC:Computer Organization and Architecture Session 7 Microprogrammed con...
 
conrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxconrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptx
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed control
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit I
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Addressing sequencing
Addressing sequencingAddressing sequencing
Addressing sequencing
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
CSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptxCSA PPT UNIT 1.pptx
CSA PPT UNIT 1.pptx
 
2.computer org.
2.computer org.2.computer org.
2.computer org.
 
16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)16-bit Microprocessor Design (2005)
16-bit Microprocessor Design (2005)
 

More from vishal choudhary (20)

SE-Lecture1.ppt
SE-Lecture1.pptSE-Lecture1.ppt
SE-Lecture1.ppt
 
SE-Testing.ppt
SE-Testing.pptSE-Testing.ppt
SE-Testing.ppt
 
SE-CyclomaticComplexityand Testing.ppt
SE-CyclomaticComplexityand Testing.pptSE-CyclomaticComplexityand Testing.ppt
SE-CyclomaticComplexityand Testing.ppt
 
SE-Lecture-7.pptx
SE-Lecture-7.pptxSE-Lecture-7.pptx
SE-Lecture-7.pptx
 
Se-Lecture-6.ppt
Se-Lecture-6.pptSe-Lecture-6.ppt
Se-Lecture-6.ppt
 
SE-Lecture-5.pptx
SE-Lecture-5.pptxSE-Lecture-5.pptx
SE-Lecture-5.pptx
 
XML.pptx
XML.pptxXML.pptx
XML.pptx
 
SE-Lecture-8.pptx
SE-Lecture-8.pptxSE-Lecture-8.pptx
SE-Lecture-8.pptx
 
SE-coupling and cohesion.ppt
SE-coupling and cohesion.pptSE-coupling and cohesion.ppt
SE-coupling and cohesion.ppt
 
SE-Lecture-2.pptx
SE-Lecture-2.pptxSE-Lecture-2.pptx
SE-Lecture-2.pptx
 
SE-software design.ppt
SE-software design.pptSE-software design.ppt
SE-software design.ppt
 
SE1.ppt
SE1.pptSE1.ppt
SE1.ppt
 
SE-Lecture-4.pptx
SE-Lecture-4.pptxSE-Lecture-4.pptx
SE-Lecture-4.pptx
 
SE-Lecture=3.pptx
SE-Lecture=3.pptxSE-Lecture=3.pptx
SE-Lecture=3.pptx
 
Multimedia-Lecture-Animation.pptx
Multimedia-Lecture-Animation.pptxMultimedia-Lecture-Animation.pptx
Multimedia-Lecture-Animation.pptx
 
MultimediaLecture5.pptx
MultimediaLecture5.pptxMultimediaLecture5.pptx
MultimediaLecture5.pptx
 
Multimedia-Lecture-7.pptx
Multimedia-Lecture-7.pptxMultimedia-Lecture-7.pptx
Multimedia-Lecture-7.pptx
 
MultiMedia-Lecture-4.pptx
MultiMedia-Lecture-4.pptxMultiMedia-Lecture-4.pptx
MultiMedia-Lecture-4.pptx
 
Multimedia-Lecture-6.pptx
Multimedia-Lecture-6.pptxMultimedia-Lecture-6.pptx
Multimedia-Lecture-6.pptx
 
Multimedia-Lecture-3.pptx
Multimedia-Lecture-3.pptxMultimedia-Lecture-3.pptx
Multimedia-Lecture-3.pptx
 

Recently uploaded

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Unit 2

  • 1. Programming The Basic Computer Unit-2
  • 2. Programming Basic Computer The list of instructions or statements that directs the computer hardware to perform specific task is called a program. There are many programming languages but,the computer basically understands programs that are given in binary (0s, 1s) form
  • 3. Those concerned with computer architecture should have a knowledge of both hardware and software because the two branches influence each other
  • 4. Instruction Set of the Basic Computer
  • 5. MACHINE LANGUAGE  Program A list of instructions or statements for directing the computer to perform a required data processing task Various types of programming languages - Hierarchy of programming languages • Machine-language - Binary code - Octal or hexadecimal code • Assembly-language (Assembler) - Symbolic code • High-level language (Compiler)
  • 7. ASSEMBLY LANGUAGE Syntax of the Basic Computer assembly language Each line is arranged in three columns called fields Label field - May be empty or may specify a symbolic Address consists of up to 3 characters - Terminated by a comma
  • 8. Instruction field - Specifies a machine or a pseudo instruction - May specify one of * Memory reference instr. (MRI) MRI consists of two or three symbols separated by spaces. ADD OPR (direct address MRI) ADD PTR I (indirect address MRI)
  • 9.  Register reference or input-output instr. Non-MRI does not have an address part * Pseudo instr. with or without an operand Symbolic address used in the instruction field must be defined somewhere as a label Comment field - May be empty or may include a comment
  • 10.
  • 13. PROGRAMMING ARITHMETIC AND LOGIC OPERATIONS Implementation of Arithmetic and Logic Operations - Software Implementation - Implementation of an operation with a program using machine instruction set - Usually when the operation is not included in the instruction set - Hardware Implementation - Implementation of an operation in a computer with one machine instruction Software Implementation example: * Multiplication - For simplicity, unsigned positive numbers - 8-bit numbers -> 16-bit product
  • 14. - Logic and Shift Operations -
  • 17. Micro programmed Control  Hardwired Control Unit: When the control signals are generated by hardware using conventional logic design techniques, the control unit is said to be hardwired.  Micro programmed control unit: A control unit whose binary control variables are stored in memory is called a micro programmed control unit.
  • 18.  Control Memory: Control Memory is the storage in the microprogrammed control unit to store the microprogram.  Writeable Control Memory: Control Storage whose contents can be modified, allow the change in microprogram and Instruction set can be changed or modified is referred as Writeable Control Memory.  Control Word: The control variables at any given time can be represented by a control word string of 1 's and 0's called a control word.
  • 19. Micro-operation, Micro-instruction, Micro program, Microcode  Microoperations: In computer central processing units, micro-operations (also known as a micro- ops or μops) are detailed low-level instructions used in some designs to implement complex machine instructions (sometimes termed macro- instructions in this context).
  • 20. Micro instruction:  A symbolic microprogram can be translated into its binary equivalent by means of an assembler.  Each line of the assembly language microprogram defines a symbolic microinstruction.  Each symbolic microinstruction is divided into five fields: label, microoperations, CD, BR, and AD
  • 21. Micro program:  A sequence of microinstructions constitutes a microprogram.  Since alterations of the microprogram are not needed once the control unit is in operation, the control memory can be a read-only memory (ROM).  ROM words are made permanent during the hardware production of the unit.  The use of a micro program involves placing all control variables in words of ROM for use by the control unit through successive read operations.  The content of the word in ROM at a given address specifies a microinstruction.
  • 22. Microcode:  Microinstructions can be saved by employing subroutines that use common sections of microcode.  For example, the sequence of micro operations needed to generate the effective address of the operand for an instruction is common to all memory reference instructions.  This sequence could be a subroutine that is called from within many other routines to execute the effective address computation.
  • 23. Organization of micro programmed control unit  The general configuration of a micro- programmed control unit is demonstrated in the block diagram of Figure  The control memory is assumed to be a ROM, within which all control information is permanently stored.
  • 24.  The control memory address register specifies the address of the microinstruction, and the control data register holds the microinstruction read from memory.  The microinstruction contains a control word that specifies one or more microoperations for the data processor. Once these operations are executed, the control must determine the next address.  The location of the next microinstruction may be the one next in sequence, or it may be located somewhere else in the control memory.
  • 25.  While the microoperations are being executed, the next address is computed in the next address generator circuit and then transferred into the control address register to read the next microinstruction.  Thus a microinstruction contains bits for initiating microoperations in the data processor part and bits that determine the address sequence for the control memory.  The next address generator is sometimes called a micro-program sequencer, as it determines the address sequence that is read from control memory.  Typical functions of a micro-program sequencer are incrementing the control address register by one, loading into the control address register an address from control memory,transferring an external address, or loading an initial address to start the control operations.
  • 26.  The control data register holds the present microinstruction while the next address is computed and read from memory.  The data register is sometimes called a pipeline register.  It allows the execution of the microoperations specified by the control word simultaneously with the generation of the next microinstruction.  This configuration requires a two-phase clock, with one clock applied to the address register and the other to the data register.  The main advantage of the micro programmed control is the fact that once the hardware configuration is established; there should be no need for further hardware or wiring changes.  If we want to establish a different control sequence for the system, all we need to do is specify a
  • 27. Address Sequencing Microinstructions are stored in control memory in groups, with each group specifying a routine. To appreciate the address sequencing in a micro- program control unit, let us specify the steps that the control must undergo during the execution of a single computer instruction.
  • 28. Step-1:  An initial address is loaded into the control address register when power is turned on in the computer.  This address is usually the address of the first microinstruction that activates the instruction fetch routine.  The fetch routine may be sequenced by incrementing the control address register through the rest of its microinstructions.  At the end of the fetch routine, the instruction is in the instruction register of the computer.
  • 29. Step-2:  The control memory next must go through the routine that determines the effective address of the operand.  A machine instruction may have bits that specify various addressing modes, such as indirect address and index registers.  The effective address computation routine in control memory can be reached through a branch microinstruction, which is conditioned on the status of the mode bits of the instruction.  When the effective address computation routine is completed, the address of the operand is available in the memory address register.
  • 30. Step-3:  The next step is to generate the microoperations that execute the instruction fetched from memory.  The microoperation steps to be generated in processor registers depend on the operation code part of the instruction.  Each instruction has its own micro-program routine stored in a given location of control memory.  The transformation from the instruction code bits to an address in control memory where the routine is located is referred to as a mapping process.  A mapping procedure is a rule that transforms the instruction code into a control memory address.
  • 31. Step-4:  Once the required routine is reached, the microinstructions that execute the instruction may be sequenced by incrementing the control address register.  Micro-programs that employ subroutines will require an external register for storing the return address.  Return addresses cannot be stored in ROM because the unit has no writing capability.  When the execution of the instruction is completed, control must return to the fetch routine.  This is accomplished by executing an unconditional branch microinstruction to the first address of the fetch routine.
  • 32. Summary: the address sequencing capabilities required in a control memory are: 1. Incrementing of the control address register. 2. Unconditional branch or conditional branch, depending on status bit conditions. 3. A mapping process from the bits of the instruction to an address for control memory. 4. A facility for subroutine call and return.
  • 33. Selection of address for control memory Above figure shows a block diagram of a control memory and the associated hardware needed for selecting the next microinstruction address.
  • 34.  The microinstruction in control memory contains a set of bits to initiate microoperations in computer registers and other bits to specify the method by which the next address is obtained.  The diagram shows four different paths from which the control address register (CAR) receives the address.  The incrementer increments the content of the control address register by one, to select the next microinstruction in sequence.  Branching is achieved by specifying the branch address in one of the fields of the microinstruction.  Conditional branching is obtained by using part of the microinstruction to select a specific status bit in order to determine its condition.  An external address is transferred into control memory via a mapping logic circuit.  The return address for a subroutine is stored in a special register whose value is then used when the micro- program wishes to return from the subroutine.
  • 35.  The branch logic of figure provides decision-making capabilities in the control unit.  The status conditions are special bits in the system that provide parameter information such as the carry-out of an adder, the sign bit of a number, the mode bits of an instruction,and input or output status conditions.  The status bits, together with the field in the microinstruction that specifies a branch address, control the conditional branch decisions generated in the branch logic.  A 1 output in the multiplexer generates a control signal to transfer the branch address from the microinstruction into the control address register.  A 0 output in the multiplexer causes the address register to be incremented.
  • 36. Mapping of an Instruction  A special type of branch exists when a microinstruction specifies a branch to the first word in control memory where a microprogram routine for an instruction is located.  The status bits for this type of branch are the bits in the operation code part of the Instruction.For example, a computer with a simple instruction format as shown in figure belowhas an operation code of four bits which can specify up to 16 distinct instructions.  Assume further that the control memory has 128 words, requiring an address of seven bits.  One simple mapping process that converts the 4-bit operation code to a 7-bit address for  control memory is shown in figure below.  This mapping consists of placing a 0 in the most significant bit of the address, transferring the four operation code bits, and clearing the two least significant bits of the control address register.  This provides for each computer instruction a microprogram routine with a capacity of  four microinstructions.  If the routine needs more than four microinstructions, it can use addresses 1000000 through 1111111. If it uses fewer than four microinstructions, the unused memory locations would be available for other routines.
  • 37. microinstruction address •One can extend this concept to a more general mapping rule by using a ROM to specify the mapping function. •The contents of the mapping ROM give the bits for the control address register. •In this way the microprogram routine that executes the instruction can be placed in any desired location in control memory. •The mapping concept provides flexibility for adding instructions for control memory as the need arises.
  • 38.
  • 39.  A Hard-wired Control consists of two decoders, a sequence counter, and a number of logic gates.  An instruction fetched from the memory unit is placed in the instruction register (IR).  The component of an instruction register includes; I bit, the operation code, and bits 0 through 11.  The operation code in bits 12 through 14 are coded with a 3 x 8 decoder.  The outputs of the decoder are designated by the symbols D0 through D7.  The operation code at bit 15 is transferred to a flip-flop designated by the symbol I.  The operation codes from Bits 0 through 11 are applied to the control logic gates.  The Sequence counter (SC) can count in binary from 0 through 15.
  • 40.  The Control memory address register specifies the address of the micro-instruction.  The Control memory is assumed to be a ROM, within which all control information is permanently stored.  The control register holds the microinstruction fetched from the memory.  The micro-instruction contains a control word that specifies one or more micro-operations for the data processor.  While the micro-operations are being executed, the next address is computed in the next address generator circuit and then transferred into the control address register to read the next microinstruction.  The next address generator is often referred to as a micro-program sequencer, as it determines the address sequence that is read from control memory.