Re: 'Wire' command?

Posted by Ferg on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Wire-command-tp2982387p2982559.html

Thanks mark,

That was one of my intentions but I was speaking more generally. I was trying to avoid having to write a wire or make16 'chip' without first checking that there was not a simpler way.

Any reason why these functions do not exist? I understand the need to use of designing more complicated chips from simpler chips but making a wire from Nand gates seems a bit mad to me.

I'll look into the Mux16 approach though, thanks for the hint.

One last syntax question. Internal arrays/buses, How do I define them?

Lets say I want to do something like--

Xor(a=x[0],b=nx, out=int[0])
//where int is a 16-bit internal bus that has not been defined anywhere before...

I get an error when I try this, should I just make an Xor16 chip?