- #1
Lolligirl
- 23
- 0
This question is worded in a confusing way:
Question: Write a Mealy finite state machine that produces the 2’s complement result of subtracting 1101 from a binary input stream (assuming at least 4 bits of input).
So our input here is e.g. 10010101 or 001011 or something similar, and we want to first subtract 1101 from the input and then convert it to a 2's complement number using a Mealy model? So if we get 10010101, we'd first subtract 1101 and get 10011000, and then it becomes 01101000? This has a whole lot of numbers changing at once...is there a way to break it down and visualize it that way to convert it to a Mealy model in smaller steps?
I'm starting to see a pattern...we only care about the first 1 (the least significant bit), and from then on, we switch the numbers so that if we get a 0, we make it into a 1, and vice-versa. I know this is terribly incomplete, but I'm trying to figure it out from here:
Basically, how do we continue this to make a Mealy machine for !(input - 1101) + 1?
Question: Write a Mealy finite state machine that produces the 2’s complement result of subtracting 1101 from a binary input stream (assuming at least 4 bits of input).
So our input here is e.g. 10010101 or 001011 or something similar, and we want to first subtract 1101 from the input and then convert it to a 2's complement number using a Mealy model? So if we get 10010101, we'd first subtract 1101 and get 10011000, and then it becomes 01101000? This has a whole lot of numbers changing at once...is there a way to break it down and visualize it that way to convert it to a Mealy model in smaller steps?
I'm starting to see a pattern...we only care about the first 1 (the least significant bit), and from then on, we switch the numbers so that if we get a 0, we make it into a 1, and vice-versa. I know this is terribly incomplete, but I'm trying to figure it out from here:
Basically, how do we continue this to make a Mealy machine for !(input - 1101) + 1?
Last edited: