implement NAND gate logic in C code without using any
bitwise operatior.
Answers were Sorted based on User's Feedback
Answer / laxmi bose
#include<stdio.h>
main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a==0||b==0)
{
printf("1");
}
else
{
printf("0");
}
Is This Answer Correct ? | 42 Yes | 13 No |
Answer / senthil.cp
NAND using Bitwise operators
c = ~(a & b) OR
c = ~a | ~b
NAND without using bitwise operators
c = (0xFF - a) + (0xFF - b)
Is This Answer Correct ? | 35 Yes | 16 No |
wat are the two methods for swapping two numbers without using temp variable??
Is it cc or c in a letter?
What is static function in c?
What is the Difference between Class and Struct?
Write a program to swap two numbers without using third variable in c?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
How to draw the flowchart for structure programs?
how many times of error occur in C
What does volatile do?
what is c?
a=(1,2,3); b=1,2,3; c=1,(2,3); d=(1,2),3; what's the value of 'a','b','c','d'
what is the difference between strcpy() and memcpy() function?