a) A circuit has four inputs, P, Q, R, and S, representing the natural binary numbers 0000 = 0, to 1111 = 15. P is the most-significant bit.The circuit has one output, X, which is true if the number represented by the input is divisible by three (regard zero as being indivisible by three.) Design a truth table for this circuit and hence obtain an expression for X in terms of P, Q, R, and S. Give the circuit diagram of an arrangement of AND, OR, and NOT gates to implement this circuit. Design a second circuit to implement this function using NAND gates only.
b) A logic circuit has three inputs C, B, and A, where A is the least-significant bit.The circuit has three outputs R, Q, and P. For any binary code applied to the input terminals (A, B, and C) the output is given by the input plus 1; for example, if C, B,A = 0,1, 1, the output R, Q, P is 1,0,0. Note that 111 + 1 = 000 (i.e. there is no carry out). Design a circuit to implement this system.
You have 3 outputs now.
CBA represent 3 digits of binary number, RQP represent digits of another binary number 1 lagger than input, so truth table will begin like: