## 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

```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

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

--
Where ARE those Iraqi WMDs?
```

### Re: finite state machines

```> 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

```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.

```

```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.
```