finite state machines

unix

    Next

  • 1. wow am i sorry Jens
    that about says it. I can't stand stupid people, from now on i will ignore my own posts ;[
  • 2. test
    All! Stas 02 2003 np: harsh noise

finite state machines

Postby tracygatica » Mon, 14 Jul 2003 10:31:27 GMT

Hi

Can anyone help me? I am taking a computer science course. I have to
stimulate a binary adder for a computer that uses 16 bit registers Do
anyone know how to do this? ANy help would be appreciated.

Re: finite state machines

Postby Larry Blanchard » Tue, 15 Jul 2003 01:52:40 GMT

In article < XXXX@XXXXX.COM >, 
 XXXX@XXXXX.COM  says...
Sounds {*filter*} to me :-).

-- 
Where ARE those Iraqi WMDs?

Re: finite state machines

Postby Siddharth Choudhuri » Tue, 15 Jul 2003 04:34:28 GMT

> stimulate a binary adder for a computer that uses 16 bit registers Do
A 16bit binary adder would have:

Inputs: A, B, CarryIn
Outputs: Sum, CarryOut
A, B, Sum -> 16 bits
CarryIn, CarryOut -> 1bit

You could use bitwise operations to simulate (not stimulate), taking care
of signed/unsigned and issues with carry. btw, this may not be the right
newsgroup to post this question.

-siddharth


Re: finite state machines

Postby Lew Pitcher » Fri, 18 Jul 2003 11:29:50 GMT

Without hesitation, garcia asserted (on or about 07/12/03 21:31) that:

Assuming that your Subject ("Finite State Machines") has something to do 
with the solution, perhaps you should examine the mechanics of binary 
addition with the intent on enumerating the possible states.

You will need to know
- how many states are in such a beast,
- what are the inputs to each state,
- what processing is performed in each state,
- what output comes out of the processing, and
- what causes a transition from one state to the next

Codify the state transitions, using procedural code (or whatever) for the 
processing for each state. Encapsulate this in a program, and that's it.

FWIW, after examining the mechanics of binary addition (i.e. from a boolean 
logic pov), it took about 5 minutes to code an 8-bit adder in C. Expanding 
this to a 16-bit adder would take about 30 seconds (or less - the length is 
codified in one constant and two storage areas).

Hint: There is a boolean equasion that governs the value of a result bit, 
given the values of the two input bits. There is a seperate boolean equasion 
to determine the value of the carry-out bit. Taking the carry-out bit into 
consideration in the addition (as a carry-in bit) changes things slightly; 
there are two different boolean equasions for result and carry-out, 
depending on whether the carry-in was 1 or 0.

-- 
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576 ( http://www.**--****.com/ )
Slackware - Because I know what I'm doing.


Similar Threads:

1.Stacked PAM responses finite state machine

All,

Is there any description of the impacts of certain pam_sm_* returns
(such as in the case of pam_sm_acct_mgmt, PAM_AUTHINFO_UNAVAIL) on the
overall success or failure of the PAM stack, please?  I know that
PAM_IGNORE implies disregarding the results of the returning module in
the overall pam_* response, but I didn't find anything for some of the
other less obvious returns.

Thanks,

Greg.

2.Using Finite state machine for Protocol design

3.[Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed

4.[patch 102/198] x86_64: Switch SMP bootup over to new CPU hotplug state machine

5.2.4.18-24 SMP Machine stuck in zombie state after kernel Oops

6. 2.4.18-24 SMP Machine stuck in zombie state after kernel Oops in devfs_d_iput

7. Fwd: [Patch] 2.4.32 - Neighbour Cache (ARP) State machine bug Fixed

8. [3/4] DST: Network state machine.



Return to unix

 

Who is online

Users browsing this forum: No registered users and 51 guest