Hi there.
I have been working on the attached question re Digital and would like to check my ideas with you. As you can see the question first asks you how you would perform addition and subtraction depending on a control line X, I have solved this using twos complement and X-or gates. The second section asks for Boolean Expressions for overflow conditions.
I can only summise that overflow occurs when you try to subtract a number with greater magnitude than 8, i.e. the MSB of M will be a zero (as it will have been twos complemented), A will be zero, X will be 1 for subtraction, and the Sum bit will be zero (again due to twos complement) -
so: A'B'S'X
And also when adding two numbers, so A and B are true, S is false due to a carry, and X is false as addition not subtraction:
so ABS'X'
is my logic flawed?
Thanks very much.
Fraser.
I have been working on the attached question re Digital and would like to check my ideas with you. As you can see the question first asks you how you would perform addition and subtraction depending on a control line X, I have solved this using twos complement and X-or gates. The second section asks for Boolean Expressions for overflow conditions.
I can only summise that overflow occurs when you try to subtract a number with greater magnitude than 8, i.e. the MSB of M will be a zero (as it will have been twos complemented), A will be zero, X will be 1 for subtraction, and the Sum bit will be zero (again due to twos complement) -
so: A'B'S'X
And also when adding two numbers, so A and B are true, S is false due to a carry, and X is false as addition not subtraction:
so ABS'X'
is my logic flawed?
Thanks very much.
Fraser.
Attachments
-
81.9 KB Views: 118