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

AI Thread 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 ?
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top