Design a circuit for A + abs(B) = C, where A and B are 4
bits wide and 2?s complement representation

Answer Posted / siva

make a 4-bit adder/subtractor ( which can perform A+B and A-
B depending on value of bit say SUB..ie if SUB is 1 it will
perform A+B ) now give A and B as inputs and make MSB of B
as SUB bit.
suppose A=0110(6),B=1110(-2);so result will be A-B ie.,
A+|B|=6-(-2)=8

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the essential components of embedded system?

417


Please write a program to show the functionality of power-save super loop?

461


What is inversion of control? How does that relate to dependency injection?

450


Tell me can a variable be both const and volatile?

475


Tell me why cannot arrays be passed by values to functions?

442






Explain what are the uses of the keyword static?

449


How do you reduce interrupt latency?

470


Tell me whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?

441


How do you react to people criticizing your code/documents?

439


What's the difference between asynchrony and concurrency?

439


How do the mvp, mvc, and mvvm patterns relate?

422


What are some examples of anti-patterns?

468


Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.

494


What is the function of simple thread poll in embedded system?

486


Can you please explain the difference between mutexes vs semaphores?

443