This is Adder.h in view mode; [Download] [Up]
//
// Adder
//
// An Objective-C class for simulating digital logic which
// simulates a two-input, n-stage full adder with carry-in
// and carry-out.
//
// Subclass of Node because it keeps some internal data.
//
#import <objc/Object.h>
#import "Node.h"
@interface Adder : Node
{
//
// External Interface
//
Node *A; // n-bit input.
Node *B; // n-bit input.
Node *CIN; // 1-bit carry input.
Node *COUT; // 1-bit carry output.
Node *OUT; // n-bit output (sum).
}
- initNumBits:(int)size a:anode b:bnode cin:cinnode cout:coutnode out:outnode;
- cycle;
@end
//
// End of file.
//These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.