Datapath for the Jump instruction
j target
PC<31:2> PC<31:28>
Calculate the jump address by con-
concat target<25:0>
catenating the high order 4 bits of
the PC with the target address
Here, the address calculation is just obtained from the high order 4
b
3724 Winter 2014
Assignment 2 Solutions
1. Floating Point Arithmetic.
The following binary numbers are represented in a 16-bit normalized format, using a 1-bit sign, a 5bit exponent with a bias of 16, and a 10-bit signicand.
[0] [10001] [1001011001]
[0
Computer Science 3724
Fall Semester, 2011
1
What will we do in this course?
We will look at the design of an instruction set for a simple
processor.
The processor is based on a real processor, the MIPS R2000.
Its instruction set is summarized on the refe
Why is the single cycle implementation not used?
In order to have a single cycle implementation, each instruction in
the instruction set must have all the operands and control signals
available to implement the full instruction.
This means, for example, t
Computer Science 3724
Fall Semester, 2011
1
What will we do in this course?
We will look at the design of an instruction set for a simple
processor.
The processor is based on a real processor, the MIPS R2000.
Its instruction set is summarized on the refe
COMPUTER SCIENCE 3724
Sample Final Examination
1. (a) In the diagram following, showing a single-cycle implementation of a subset of
the MIPS processor, sketch the required additions to the datapath for the AND
immediate (andi) instruction. Show the value
It is now a matter of straightforward substitution to arrive at the
microcode to be stored in the ROM:
ALU
Register
PCWrite
State control SRC1 SRC2 Control Memory control
Sequencing
0
00
0
01
000
1001
0010
11
1
00
0
11
000
0000
0000
01
2
00
1
10
000
0000
Consider the following example:
Program Time on
Time on
Machine A Machine B
P1
10 s
20 s
P2
50 s
25 s
Here, if we consider P1, then Machine A is twice as fast as Machine
B. If we consider program P2, Machine B is twice as fast as Machine
A.
It may be reas
Computer Science 3724
Sample Midterm
1. (a) Write a MIPS assembly language function having two signed integer arguments
which returns the minimum of the two arguments. Use standard MIPS conventions for linking the function to the main program.
(b) Write a
Note that this implementation requires 32 shift and add operations,
and requires that the multiplier, multiplicand, and product all be
stored in separate registers.
Noting that the product register consumes one additional bit on
each iteration, and the mu
0/0
A
A
Y =0
Z = 0
1/0
Y
=1
Z=0
B
Z=0
C
1/0
Z=0
C
D
X/0
B
X/0
Y =1
Z=0
D
Y =0
Z = 1
126
0/1
State Table
Present State Input Next State Output
A
0
A
0
A
1
B
0
B
0
C
0
B
1
C
0
C
0
D
0
C
1
D
0
D
0
A
1
D
1
B
0
We will rst design a state machine correspond
This idea can be extended to the use of two registers. This would be
useful for addressing data in a 2-dimensional structure like a table.
The address would be calculated as
address = Ri + Rj + displacement
and is usually called based indexed addressing.
The following gureshows a timing diagram for a D-type ip-op.
This type of device is said to be edge triggered either rising
edge triggered (i.e. a 01 transition) or falling edge triggered (i.e.,
a 10 transition) devices are available.
CLOCK
D
Q
time
(a)
Computer Science 3724
Assignment 2
(due October 18, 2011)
1. Show how the following can be implemented with simple switches:
(a) A B C
(b) A + B
(c) A B
2. Show that, for 2-input switching functions, the set AND, OR, and NOT is functionally
complete any o
ENG 6861 COMPUTER ARCHITECTURE
Assignment #0 : RV : Issued Sep. 17, 2015 Due: Sep. 25, 2015
0)
You are considering an enhancement to the implementation of the divide operation in the processor your
company is designing for a particular application. Assume
Introduction to
Computer Organization
What is Technology?
Bran Ferren:
Stuff that doesnt work yet.
Douglas Adams:
We no longer think of chairs as technology, we just think of
them as chairs. But there was a time when we hadnt worked
out how many legs chai
Boolean Algebra and Digital
Circuits
Part 1: Boolean Algebra
Binary Logic and Digital Circuits
we saw in the previous set of lectures how
computers represent information
and in particular how they perform arithmetical
operations upon numbers
in the follow
Boolean Algebra and Digital
Circuits
Part 2: Karnaugh Maps
A Systematic Approach
how to simplify a boolean function is not
always obvious
nor easy
Karnaugh Maps (Kmaps) represent boolean
functions graphically
in a table of minterms
and allow us to sy
3724 Winter 2014
Assignment 1
Due Date: 28th January 9am
1. Convert 10010101 to decimal using the table method. [5 marks]
2. Convert 55 to binary using: [10 marks]
a.
repeated-subtraction method
b.
division-remainder method
3. Convert 1011101001011110 to
3724 Winter 2014
Assignment 2
Due Date: 6th February 9am
Please show all working.
1. Floating Point Arithmetic.
The following binary numbers are represented in a 16-bit normalized format, using a 1-bit sign, a 5bit exponent with a bias of 16, and
3724 Winter 2014
Assignment 3
Due Date: 25th February 9am
Please show all working.
1. Creating Digital Circuits: The Half-Adder
We know that the NAND gate is universal, so all other gates can be built using just NAND gates.
Hence we should be able
A Pipelining Example
A CPU has a 6-stage pipeline:
1
2
3
4
5
6
fetch instruction
decode instruction
calculate effective address of operands
fetch operands
execute instruction
store result
The CPU has a general purpose register architecture with just
Computer Science 3724 Winter 2014 Midterm Exam
Thursday 13th February 2014
Name:
_Model Answers_
Student ID:
_
There are 100 marks in total. The exam is 70 minutes long.
There are 7 pages with appendix. There are 5 questions, each of which ha
Computer Science 3724 Winter 2014 Midterm Exam
Thursday 13th February 2014
Name:
_
Student ID:
_
There are 100 marks in total. The exam is 70 minutes long.
There are 7 pages with appendix. There are 5 questions, each of which has multiple par
A Simple Computer
Part 2: MARIE
MARIE
A Machine Architecture that is Really Intuitive and Easy
has functional components of a real computer:
memory, where program and data are stored
CPU, including an ALU and registers
an accompanying instruction set
we'l
A Simple Computer
Part 1: Key Architectural
Components
Bringing it Together
recall the basic denition of a computer:
it takes input and output
it processes and stores information
it controls what it does
we have a good idea of how to perform many of the
s
Data Representation
Part 3: Floating Point Numbers
Integers are Not Enough
we've got integer representation gured out for most needs
great, but how do we represent
pi = 3.14159265
e = 2.71828 ?
or, given the max/min values and overow problem:
0.000000001
Data Representation
Part 2: Signed Integer Representations
Binary - who needs it?
we've seen how to represent unsigned integers in binary
we've seen how to convert between decimal and binary
and we've also seen what a pain that can be
so why not let a com