MHB Writing a Mealy model for the 2's complement of subtracting 1101?

Click For Summary
The discussion centers on creating a Mealy finite state machine to compute the 2's complement of a binary input after subtracting the binary number 1101. The input is a binary stream, and the process involves first performing the subtraction and then converting the result to 2's complement. Participants express confusion over the wording of the question and the complexity of the operations involved. There is a suggestion to visualize the process in smaller steps to better understand how to implement the Mealy model. Clarification is sought regarding the direction of input processing, whether it should be from left to right or right to left.
Lolligirl
Messages
22
Reaction score
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:
image.jpg


Basically, how do we continue this to make a Mealy machine for !(input - 1101) + 1?
 
Last edited:
Technology news on Phys.org
Dear from which side you are accepting your string ... i mean from left to right or from right to left ?
 

Similar threads

Replies
5
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 17 ·
Replies
17
Views
5K
  • · Replies 17 ·
Replies
17
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K