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

Click For Summary
SUMMARY

The discussion focuses on constructing a Mealy finite state machine (FSM) to compute the 2's complement of the result from subtracting the binary number 1101 from a binary input stream. The input is specified to be at least 4 bits long, and the example provided illustrates the process: subtracting 1101 from 10010101 yields 10011000, which is then converted to 2's complement, resulting in 01101000. The conversation emphasizes breaking down the process into manageable steps to visualize the FSM effectively, particularly highlighting the importance of handling the least significant bit and bit inversion.

PREREQUISITES
  • Understanding of Mealy finite state machines
  • Knowledge of binary arithmetic, specifically 2's complement
  • Familiarity with binary subtraction techniques
  • Basic concepts of state transitions in digital logic design
NEXT STEPS
  • Study the design principles of Mealy and Moore state machines
  • Learn binary subtraction methods and their implementation in digital circuits
  • Explore visual tools for modeling finite state machines
  • Investigate the process of converting binary numbers to 2's complement
USEFUL FOR

Digital logic designers, computer engineers, and students studying finite state machines and binary arithmetic will benefit from this discussion.

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
6K
  • · Replies 17 ·
Replies
17
Views
2K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K