cesarblum / sectorforth

sectorforth is a 16-bit x86 Forth that fits in a 512-byte boot sector.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nand

opened this issue · comments

I think what you will find is that 0= can be made to equal to logical not as long as anything which is nonzero is truthy.

Since 0= can mean logical not, that means that nand can be performed by first performing an and, and then performing a 0=. And so instead of having a nand operation, you can have an and operation and a 0= opetation.

Switching from and to nand may save you a very small number of bytes depending on how you have implemented nand.

I hope that helps.