0% found this document useful (0 votes)
26 views

Lab5

Uploaded by

23162034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Lab5

Uploaded by

23162034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Instructions for Lab#5

Student ID: Group:


Full in name:

Theory (Memory, Architectures, Interrupts and Stacks)


1. Review the lecture slides on types of memory and provide a short answers to the following questions
(using your own words):
1.1. What is ROM and what is its primary purpose ?
1.2. What is RAM and how is it different from ROM ?

1.3. What is the difference between static RAM and dynamics RAM ?

1.4. What type of memory is typically used in USB thumb drives ? Why shouldn’t we rely on this for
critical data storage ?

2. Consider a computer with 1GB RAM (1024 MB). Given memory addressing is for each byte, how
many bits are needed to address all bytes in the system’s RAM ?

3. Give a brief description of the Von Neumann and Harvard computing architectures. What are the
fundamental differences between the two and for what is is each designed to achieve ?

What is cache memory and what is its primary role ?.

4. Explain the concept of an interrupt, and list four common types.

4.1. Polling is an alternative to interrupts ? Briefly explain polling and why it is not com- monly used.

5. Explain the general concept of a stack - how do they work, and what is their primary pur- pose.

5.1. How are stacks useful for handling interrupts ?


Stacks are useful for handling interrupts by maintaining the context of the CPU before an interrupt occurs.
When an interrupt is triggered, the current state (including the program counter and registers) is pushed onto
the stack
5.2. How are stacks useful in programming ?
Stacks are essential in programming for managing function calls, supporting recursion, implementing undo
features, evaluating expressions, and facilitating backtracking by efficiently tracking temporary data and control
flow

Provide all the answers to the above questions in your submission ocument. Practical - Stacks of

Stacks ! (please re-design and explain how it work)


Page 1 of 3
6. Start Logisim and open a new canvas
7. Review the lecture slides on building a stack at the top of this lab sheet. We are going to build a 5-bit
deep, 1-bit wide stack.
8. Start by building a simple shift register that moves bits from one flip flop to the next each clock pulse.
For this you will need a “Data In” pin which sets the next bit to be pushed to the stack, and a clock to
invoke the shifting.

9. For your shift register to work as a stack, it needs to be bi-directional. This means the in- put to any
Flip Flop could come from two places - the left or the right. In lectures we dis- cussed a simple
“encoder” circuit that selects which of two data inputs is allowed through, based on a third selection bit.
Design the logic for this 2-bit encoder, and demonstrate it to your lab demonstrator.

10. Now incorporate your encoder above to allow bi-directional shifting of your stack. Your stack should:
10.1. push and pop bits onto and off the stack, using clock pulses and a direction toggle switch
10.2. show the state of each Flip Flop using LEDs.

Page 2 of 3
Export your circuit as an image and include it in your submission document. Demon- strate your
working stack to your lab demonstrator.

11. Modify your stack so that it has the option to read out its contents in parallel to a sepa- rate register of D
Flip Flops. This should only occur when a “stack dump” toggle switch (i.e., pin) is enabled. When the
toggle is disabled, the register of D Flip Flops should re- tain the last state read in (and should have
LEDs connected to each Flip Flop out showing its state).

Export your circuit as an image and include it in your submission document. Demon- strate your
working stack to your lab demonstrator.

Page 3 of 3

You might also like