# Question on State Table Outputs

Discussion in 'Electronic Basics' started by Steven O., Nov 9, 2004.

1. ### Steven O.Guest

Hi. I'm taking a course on introductory digital logic, and there is a
question where I have a disagreement with the instructor, and I think
he may be mistaken on a certain point. We are using the text Digital
Design by Mano, and while the book is generally very good, I think
even the text is not fully clear on this.

Suppose you have a State Table for a simple circuit with, say, two
flip flops (A and B), input X, and output Y. So the headings for the
table are:

Present State (time T) Input (T) Next State (T+1) Output (T+1)
A_______B__________X_______ A____ B_____________ Y

Now, the question is right there in the table heading, because the
instructor says that the output column, Y, should be for time T --
that is, it is based on the states of A and B at time T. To me that
makes no sense -- it seems the whole point is to start with A and B at
time T, put in your input X, and see what A, B, and Y are at time T+1.
So, that's basically the question -- is the output column for time T,
or for time T+1?

Thanks in advance for all replies.

Steve O.

"Spying On The College Of Your Choice" -- How to pick the college that is the Best Match for a high school student's needs.
www.SpyingOnTheCollegeOfYourChoice.com

Steven O., Nov 9, 2004

2. ### Tim WescottGuest

Steven O. wrote:
> Hi. I'm taking a course on introductory digital logic, and there is a
> question where I have a disagreement with the instructor, and I think
> he may be mistaken on a certain point. We are using the text Digital
> Design by Mano, and while the book is generally very good, I think
> even the text is not fully clear on this.
>
> Suppose you have a State Table for a simple circuit with, say, two
> flip flops (A and B), input X, and output Y. So the headings for the
> table are:
>
> Present State (time T) Input (T) Next State (T+1) Output (T+1)
> A_______B__________X_______ A____ B_____________ Y
>
> Now, the question is right there in the table heading, because the
> instructor says that the output column, Y, should be for time T --
> that is, it is based on the states of A and B at time T. To me that
> makes no sense -- it seems the whole point is to start with A and B at
> time T, put in your input X, and see what A, B, and Y are at time T+1.
> So, that's basically the question -- is the output column for time T,
> or for time T+1?
>
> Thanks in advance for all replies.
>
> Steve O.

Well, the first thing to remember with any kind of a paper method like
this is that it means whatever the hell you want it to mean; as long as
you are clear and unambiguous about it then you're fine.

Second, there are generally two types of state machines, whose names I
cannot remember (one is Mealy, I think, but I'm just an analog guy who
writes software). One type has outputs which are entirely dependent on
the state, and the other has outputs that are a function of the state
and the input. In the case of the second type I would be less confused
by a table that shows the _current_ output as a function of the
_current_ state and _current_ input -- particularly if there were
(shudder) input changes going on in between state transitions. Even for
the first type, knowing the _current_ output given the _current_ state
would, I think, be least confusing for me.

My suggestion would be to go ahead and use the notation as used in the
class, and make sure that you're facile with it. As soon as you're out
of that class you can do whatever the heck you want -- your reader's
questions will give you guidance about whether you made the best choice.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Tim Wescott, Nov 9, 2004

3. ### John PopelishGuest

"Steven O." wrote:
>
> Hi. I'm taking a course on introductory digital logic, and there is a
> question where I have a disagreement with the instructor, and I think
> he may be mistaken on a certain point. We are using the text Digital
> Design by Mano, and while the book is generally very good, I think
> even the text is not fully clear on this.
>
> Suppose you have a State Table for a simple circuit with, say, two
> flip flops (A and B), input X, and output Y. So the headings for the
> table are:
>
> Present State (time T) Input (T) Next State (T+1) Output (T+1)
> A_______B__________X_______ A____ B_____________ Y
>
> Now, the question is right there in the table heading, because the
> instructor says that the output column, Y, should be for time T --
> that is, it is based on the states of A and B at time T. To me that
> makes no sense -- it seems the whole point is to start with A and B at
> time T, put in your input X, and see what A, B, and Y are at time T+1.
> So, that's basically the question -- is the output column for time T,
> or for time T+1?
>
> Thanks in advance for all replies.

Devices with memory produce outputs at time T+1 based on the outputs
and inputs at time T. The outputs are locally stored inputs.

--
John Popelish

John Popelish, Nov 9, 2004
4. ### Andrew HolmeGuest

Steven O. wrote:
> Suppose you have a State Table for a simple circuit with, say, two
> flip flops (A and B), input X, and output Y. So the headings for the
> table are:
>
> Present State (time T) Input (T) Next State (T+1) Output (T+1)
> A_______B__________X_______ A____ B_____________ Y
>
> Now, the question is right there in the table heading, because the
> instructor says that the output column, Y, should be for time T --
> that is, it is based on the states of A and B at time T. To me that
> makes no sense -- it seems the whole point is to start with A and B at
> time T, put in your input X, and see what A, B, and Y are at time T+1.
> So, that's basically the question -- is the output column for time T,
> or for time T+1?

If Y is a combinatorial logic function of A and B _only_, then it doesn't
matter whether you tabulate Y(T) or Y(T+1) as long as you say which it is.
You've got A(T), B(T), A(T+1) and B(T+1) all tabulated on the same line.

Y(T) = f( A(T), B(T) )
Y(T+1) = f( A(T+1), B(T+1) )

i.e. Y(n) = f (A(n), B(n))

Andrew Holme, Nov 9, 2004
5. ### Steven O.Guest

I thought it was implied that since we have flip-flops, the logic is
sequential and not combinatorial. But if I make that explicit -- this
is sequential logic -- then how does the answer to my question come
out?

On Tue, 9 Nov 2004 23:00:22 -0000, "Andrew Holme" <>
wrote:

>Steven O. wrote:
>> Suppose you have a State Table for a simple circuit with, say, two
>> flip flops (A and B), input X, and output Y. So the headings for the
>> table are:
>>
>> Present State (time T) Input (T) Next State (T+1) Output (T+1)
>> A_______B__________X_______ A____ B_____________ Y
>>
>> Now, the question is right there in the table heading, because the
>> instructor says that the output column, Y, should be for time T --
>> that is, it is based on the states of A and B at time T. To me that
>> makes no sense -- it seems the whole point is to start with A and B at
>> time T, put in your input X, and see what A, B, and Y are at time T+1.
>> So, that's basically the question -- is the output column for time T,
>> or for time T+1?

>
>If Y is a combinatorial logic function of A and B _only_, then it doesn't
>matter whether you tabulate Y(T) or Y(T+1) as long as you say which it is.
>You've got A(T), B(T), A(T+1) and B(T+1) all tabulated on the same line.
>
>Y(T) = f( A(T), B(T) )
>Y(T+1) = f( A(T+1), B(T+1) )
>
>i.e. Y(n) = f (A(n), B(n))
>
>
>

"Spying On The College Of Your Choice" -- How to pick the college that is the Best Match for a high school student's needs.
www.SpyingOnTheCollegeOfYourChoice.com

Steven O., Nov 10, 2004
6. ### Francois ChoquetteGuest

There are two major state machine types : Moore and Mealy.

Moore : output is only dependent on the current state

Mealy : output is a combinatorial function of current state and
current input(s)

So, for your example, Output column should be for time (T), not (T+1).
You may take a look at Randy H Katz Contemporary Logic Design book
from '93, available online at
http://www2.ele.ufes.br/~ailson/digital2/cld/CLD.html, chapter 8 :
Finite state machine design.

Have fun!

Francois Choquette

Steven O. <> wrote in message news:<>...
> Hi. I'm taking a course on introductory digital logic, and there is a
> question where I have a disagreement with the instructor, and I think
> he may be mistaken on a certain point. We are using the text Digital
> Design by Mano, and while the book is generally very good, I think
> even the text is not fully clear on this.
>
> Suppose you have a State Table for a simple circuit with, say, two
> flip flops (A and B), input X, and output Y. So the headings for the
> table are:
>
> Present State (time T) Input (T) Next State (T+1) Output (T+1)
> A_______B__________X_______ A____ B_____________ Y
>
> Now, the question is right there in the table heading, because the
> instructor says that the output column, Y, should be for time T --
> that is, it is based on the states of A and B at time T. To me that
> makes no sense -- it seems the whole point is to start with A and B at
> time T, put in your input X, and see what A, B, and Y are at time T+1.
> So, that's basically the question -- is the output column for time T,
> or for time T+1?
>
> Thanks in advance for all replies.
>
> Steve O.
>
>
>
> "Spying On The College Of Your Choice" -- How to pick the college that is the Best Match for a high school student's needs.
> www.SpyingOnTheCollegeOfYourChoice.com

Francois Choquette, Nov 10, 2004
7. ### Andrew HolmeGuest

Steven O. <> wrote
> I thought it was implied that since we have flip-flops, the logic is
> sequential and not combinatorial. But if I make that explicit -- this
> is sequential logic -- then how does the answer to my question come
> out?

State machines contain combinatorial logic and flip-flops. The sum of
the parts is sequential logic.

Andrew Holme, Nov 10, 2004