summaryrefslogtreecommitdiffstats
path: root/Bachelor/Digitaltechnik 2/SS07/P6/abel_samples.zip_FILES/add1b.abl
blob: 52e7827bb5f3d3ad0b0571b0363e8d41997fefec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
MODULE adder_1bit

TITLE 'Volladdierer mit Carry'

DEClARATIONS
	Bit_1 	pin 15;  // I/O 0, input
	Bit_2 	pin 16;  // I/O 1, input
	C_in  	pin 17;  // I/O 2, input

	Sum	pin 29 istype 'com';  // I/O 12, output kombinatorisch
	C_out   pin 30 istype 'com';  // I/O 13, output kombinatorisch


TRUTH_TABLE ( 	[Bit_1,Bit_2,C_in]	->	[Sum,C_out] ) // Wahrheitstabelle des Volladdierers

		[0    ,0    ,0   ]  	->	[0  ,0    ];
		[0    ,0    ,1   ]  	->	[1  ,0    ];
		[0    ,1    ,0   ]  	->	[1  ,0    ];
		[0    ,1    ,1   ]  	->	[0  ,1    ];
		[1    ,0    ,0   ]  	->	[1  ,0    ];
		[1    ,0    ,1   ]  	->	[0  ,1    ];
		[1    ,1    ,0   ]  	->	[0  ,1    ];
		[1    ,1    ,1   ]  	->	[1  ,1    ];

END