Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

State Diagram for 4-bit Calculator

Status
Not open for further replies.

shankyD

Newbie
Newbie level 1
Joined
Nov 12, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
singapore
Visit site
Activity points
1,295
Hi,
My assignment is to build a 4-bit calculator. Basically, the input is a keypad from 0 to F. Where using A as '+' and E and '='. The components are the registers, full adders and a BCD segment display. Well, my group and I and kind of stuck figuring out the FSM for the calculator as our lecturer wants us to build the FSM using CedarLogic and from there to modify it. We have tried using the keypad as inputs and 2 states and the outputs are the 4 bits, 2 for resetting the register, 2 for loading the register and one for generating the display from the output of the adder. what we want to do is, when keying a number, it should appear on the display as well as going into to the register. Then, waiting for the A or E operation. Once A is pressed, the display will still show the first input till a second input number is keyed in. We are also wanting to make it a cascade addition. Once E is pressed, the output of the adder will be displayed. Pretty simple. We don't want the to be given the solution. just helping it would be really great.

Thank you in advance.
 

Hi, why you are thinking of use FSM to solve your problem :thinker: you just need to use keypad first with registers controlled by "E" button to load data to register B then the "F" button to enable the op of the adders to register on edge and keep it with the other edge then display , yours FSM is already exist in the adder

hope it helps
Ziad
 

There are a lot of details missing from your specification and how the calculator should behave given keypad inputs.
e.g. if you key in the following sequence what should happen? 2,4,+5,+,1,=
Would the answer be 0: 4+5+1 (drop carry), A: 10 (represented as HEX), 8: 2+5+1 (ignore the 2nd number entry)

What happens if you key in +,+?

Your FSM would define the behavior of the calculator based on the key sequences used. i.e. the keypad transitions the FSM through states like: state_load_first_number, state_add, state_load_second_number, state_result_equals, etc.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top