5

a) Sets C=N=1:

  1111
+ 1111
  ----
  1110
(any non-overflowing addition of two negative numbers has this property)


b) Sets C=Z=1:

  1111
+ 0001
  ----
  0000
(add any number to its arithmetic negation for an example of this one)


c) Sets V=N=1:

  0111
+ 0111
  ----
  1110
(any overflowing addition of two non-negative numbers will do here)


d) Sets V=Z=1:

  1000
+ 1000
  ----
  0000
(I think that this is the only addition which sets both V and Z)


e) Sets N=Z=1:

This is impossible. If the result is negative, it is not zero.


[exam] [main course page]