implement NAND gate logic in C code without using any
bitwise operatior.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is this program statement valid? INT = 10.50;

686


What is a #include preprocessor?

618


Differentiate between ordinary variable and pointer in c.

618


Is it possible to initialize a variable at the time it was declared?

757


Difference between Function to pointer and pointer to function

634






What is memory leak in c?

637


Describe the steps to insert data into a singly linked list.

622


how can I convert a string to a number?

597


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

604


What is the purpose of type declarations?

681


What is a newline escape sequence?

665


What is a string?

666


How can you increase the allowable number of simultaneously open files?

597


What is wrong with this program statement?

610


What is a wrapper function in c?

590