3-Bit Parity Function: "Control-Oriented"
if A = '1' then
if B = '1' then
if C = '1' then parity <= '1';
else parity <= '0';
endif;
else
if C = '1' then parity <= '0';
else parity <= '1';
endif;
end if;
else
if B = '1' then
if C = '1' then parity <= '0';
else parity <= '1';
endif;
else
if C = '1' then parity <= '1';
else parity <= '0';
endif;
end if;
end if;
0
0
0
0
1
1
1
1
0
1
A
C
B
p
a
r
i
t
y
Previous slide
Next slide
Back to first slide
View graphic version