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

What is the difference between functions abs() and fabs()?

863


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1359


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2947


Write a program for Overriding.

902


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

2150


What is string function c?

775


What is the code for 3 questions and answer check in VisualBasic.Net?

1906


Give differences between - new and malloc() , delete and free() ?

847


Without Computer networks, Computers will be half the use. Comment.

2048


write a programming in c to find the sum of all elements in an array through function.

1915


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

2877


What are the types of data types and explain?

853


Why can’t constant values be used to define an array’s initial size?

1091


What is an auto keyword in c?

856


Explain why C language is procedural?

964