In the digital circuit shown below, the output f is found to be logic 1 when A is logic '0'. The values of B and C are