Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CPEN 4700 Exam Two Review (Answered) 100%

Rating
-
Sold
-
Pages
16
Grade
A+
Uploaded on
04-12-2023
Written in
2023/2024

CPEN 4700 Exam Two Review (Answered) 100% CPU's Three Major Components An Arithmetic/Logic Unit (ALU) that performs computations on binary data. Registers that are used to hold operands and/or memory addresses for operands A control unit that controls and sequences the behavior of the other components (and rest of system) based on programmed instructions Von Neumann execution cycle Design of a machine that carries out the steps. Involves: Fetching, decoding, executing, and writing back instructions (FDEW) Instruction Set Architecture (ISA) The part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O. Computer systems that share an ISA are compatible – meaning they can execute the same programs bit fields Within a machine language instruction format of a given number of bits, the bits are divided into this. Each part has a specific meaning to the control unit. EX IMAGE (16 bi

Show more Read less
Institution
Course

Content preview

CPEN 4700 Exam Two Review (Answered)
100%
CPU's Three Major Components
An Arithmetic/Logic Unit (ALU) that performs computations on binary data.
Registers that are used to hold operands and/or memory addresses for operands
A control unit that controls and sequences the behavior of the other components (and
rest of system) based on programmed instructions
Von Neumann execution cycle
Design of a machine that carries out the steps. Involves: Fetching, decoding, executing,
and writing back instructions (FDEW)
Instruction Set Architecture (ISA)
The part of the computer architecture related to programming, including the native data
types, instructions, registers, addressing modes, memory architecture, interrupt and
exception handling, and external I/O.
Computer systems that share an ISA are compatible – meaning they can execute the
same programs
bit fields
Within a machine language instruction format of a given number of bits, the bits are
divided into this. Each part has a specific meaning to the control unit.

EX IMAGE (16 bits divided into a total of five bit fields)
Operation Code (Op code)
The leftmost field (4 bits). It determines the function of the instruction--What will it do?
Operation Code Details
The number of op code bits determines the number of different machine language
instructions the computer can have.In this case, four bits are used for the op code- thus
machine can have at most 2^4 = 16 different instructionsNeed more bits for op code for
more machine instructions
Register Selection Field
The Second and Fourth fields- they each determine which CPU registers will be used by
the instructions.

the number of bits determines the number of registers that the machine can have.

In this case, three bits are used to identify each register--therefore the machine can only
have 2^3 = 8 registers (at least of the type used by this instruction)
Mode Selection Field
The Third and fifth fields-they determine which addressing modes will be used by the
instruction to locate operands (In conjunction with the associated registers)

The number of bits determines the number of addressing modes that can be used to
identify operands for the machine instructions.•

,In this case, three bits are used to identify the mode - therefore the machine can only
have up to 2^3 =8 addressing modes for operands.
Instruction types --might be asked to give an example (can describe an action,
doesn't necessarily have to be a real instruction mnemonic), or match an example
with an instruction type
Data transfer, Computational, Control Transfer, I/O, System control, Miscellaneous
Registers
are used to holdoperands and/or memory addressesfor operands
Data Transfer Instruction Type
Copy data from one place to another within the machine (without doing any actual
computation)

Memory to register. Register to memory. Register to register. Memory to memory (in
some machines). Constant to register or memory
Computational Instructions type
Computational instructions produce a numerical result(s) based on the operands and
the operation performed on them.

1. Integer arithmetic (ex. addition, multiplication)

2. Real-number arithmetic (if needed for the intended applications) (ex. also addition,
multiplication)

3. Boolean logic (ex. AND, OR)

4. Bit shifting (moving bits left or right)

5. Comparisons (ex. <, >, =)
Control transfer instructions type
Those which have the potential to alter the normally sequential flow of instruction
execution (by altering the program counter or instruction pointer).
Input/Output instructions type
Those that enable the CPU to send or receive information to/from devices that connect
the computer to the outside world (human users or other machines)
System instructions Type
Typically those that facilitate control of the system environment by the OS - things we
generally don't want user/application programs to be able to do:
• Enabling/disabling interrupts
• Switching between privilege levels
• Cache and MMU control
• etc.
Miscellaneous instructions Type
nstructions that don't clearly fall into any of the above categories ca
*Given an instruction in assembly/binary and some information about it, show the
opposite and describe the operands and what it does
Find Example in 3.1 Slideshow

, The chosen operation is specified by...
the op code
Addressing Modes Definition
The means provided by the architecture to specify the value(s)and/or location(s) of
instruction operands.
Immediate Addressing -- OPERAND is in Instruction
Embed the operand itself (in binary) into the machine language instruction. In other
words, the instruction specifies explicitly what the operand is.
Primary advantage of immediate addressing is speed of operation.
Since the operand is embedded in the code – and since most architectures do notallow
for self-modifying code, it's good for constant operands only
Direct Addressing – OPERAND is in specified memory location (in instruction)
Uses a bit field within the instruction to specify which main memory location contains an
operand (and/or receives the result).

• Instead of op code followed by the operand (as in immediate addressing), we have op
code followed by the memory address of the operand
Register Addressing Example
Operand is in one of the CPU registers as specified in the instruction

Example (The bit field in blue tells us the operand is currently stored in R1 (00001))
Register Addressing
Uses a bit field within the instruction to specify which of the several CPU registers
contains an operand (and/or receives the result computed by the ALU).
Advantages:
1. Operands kept in registers can be accessed very quickly (registers are part of the
CPUcore and connect directly to the ALU).
2. We usually only need a small bit field to identify a CPU register (3 bits if there are
8registers, 4 bits if there are 16 registers, 5 bits if there are 32).
Advantages/Disadvantages of Register Addressing
Advantages:
1. Operands kept in registers can be accessed very quickly (registers are part of the
CPUcore and connect directly to the ALU).
2. We usually only need a small bit field to identify a CPU register (3 bits if there are
8registers, 4 bits if there are 16 registers, 5 bits if there are 32).
Disadvantages:
1. There are usually only a limited number of CPU registers (see previous bullet), and
someof them may be needed for other uses. (Only able to keep only the most frequently
usedvariables in registers.)
2. Registers are fine for scalar (individual) variables, but cannot generally hold large,
multi-element data structures such as strings or arrays. (In a modern 64-bit processor,
most ofthe general purpose registers are 64 bits.)
Advantages/Disadvantages of Direct addressing
Advantage:
most modern computers have very large amounts of RAM main memory, sowe can
have essentially as many direct-addressed variables as we like

Written for

Course

Document information

Uploaded on
December 4, 2023
Number of pages
16
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$14.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
LectDan Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
221
Member since
3 year
Number of followers
157
Documents
7985
Last sold
5 days ago

4.0

48 reviews

5
25
4
12
3
2
2
4
1
5

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions