hi I am new here. I have started an assembly class and I have completed the beginning assignments about making a program perform addition and what not. I am now stuck on making it do an NAND function. I have to use 16 bit registers, but I cant wrap my head around the logic. I must NAND these numbers together. Can anyone get me started?

short int num1 = 0x115C;
short int num2 = 0x1E61;
short int num3 = 0x1E61;

Nand isn't a single operation. How is nand defined? That will give you your answer.

If you are using x86 assembly, look at the and and not instructions. If you are using MIPS, you'll have to think just a little harder: and and xor.

Good luck.

thank you, one more quick thing, is ax as in mov ax considered 16 bit registers?

Yes. AH and AL are 8-bits. AX is 16-bits. EAX is 32 bits.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.