mirror of
https://github.com/ehw-fit/ariths-gen.git
synced 2025-04-26 00:31:22 +01:00
14 lines
228 B
C
14 lines
228 B
C
#include <stdio.h>
|
|
#include <stdint.h>
|
|
|
|
uint8_t not_gate(uint8_t _a){
|
|
return ~((_a >> 0) & 0x01) & 0x01 << 0;
|
|
}
|
|
|
|
#include <assert.h>
|
|
int main(){
|
|
for (int i = 0; i < 2; i++){
|
|
assert(!(i) == not_gate(i));
|
|
}
|
|
return 0;
|
|
} |