Question: Project #2: Stack Arithmetic See the RUBRIC Below before starting the design For this circuit, you wi need to implement a simple finite state machine

 Project #2: Stack Arithmetic See the RUBRIC Below before starting thedesign For this circuit, you wi need to implement a simple finite

Project #2: Stack Arithmetic See the RUBRIC Below before starting the design For this circuit, you wi need to implement a simple finite state machine to control a stack of 4-bit unsigned integers. If you are not familiar with the stack abstract data type, check htt n.wikipedia.or wiki/Stack (abstract data t You have to design this stack so that its contents can be used to perform some simple arithmetic. The user must be able to perform four operations: Push A value is added to the top of the stack. Pop The top-most value is removed from the stack Pop with Add The top two values on the stack are popped from the stack, added together, and the result is pushed back onto the top of the stack. Pop with subtract The top two values on the stack are popped from the stack used to perform subtraction, and the result is pushed back onto the top of the stack (The first value popped is subtracted from the second value popped Pop and exchange The top two values on the stack are popped and inserted back on the stack in reverse order To keep things simple, the maximum stack depth will be four. Your circuit should display the complete contents of the stack on HEX3 through HEX0. To be clear, HEX3 should display the first value pushed onto the stack, HEX2 should display the second value, and so on. The seven-segment display should have no lit LEDs if it does not contain a value Some notes about error handling: Stack overflow If a push is performed, but there is no more room on the top of the stack, the contents of the stack should not be changed and the stack overflow register should be set. Hook this register up to an LED to notify the user. This register and LED should remain set and lit until the board is reset Stack Underflow If any of the three pop operations are performed without enough values on the stack to perform that operation, the contents of the stack should not be changed and the stack underflow register should be set. Hook this register up to an LED to notify the user. This register and LED should remain set and lit until the board is reset

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!