97 lines
3.5 KiB
Markdown
97 lines
3.5 KiB
Markdown
# Aksjomaty algebry boola
|
|
1. $(\bar 0 = 1) \cap (\bar 1 = 0)$
|
|
2. $(x+1=1) \cap (x \cdot 1 = x)$ - 1 elementem neutralnym dla iloczynu
|
|
3. $(x+0=x) \cap (x \cdot 0 = 0)$ - 0 elementem neutralnym dla sumy
|
|
4. $(x + \bar x = 1) \cap (x \cdot \bar x = 0)$ - Prawo negacji
|
|
5. $(x+x=x)\cap (x\cdot x = x)$ - Prawo idempotentności
|
|
6. $\bar{\bar x} = x$
|
|
7. $(\overline{x+y}=\bar{x}\cdot \bar{y})\cap (\overline{xy}=\bar{x}+\bar{y})$ - Prawo de morgana - $\overline{\bar{a}\cdot\bar{b}}=a+b$
|
|
8. $(x+y = y+x) \cap (x\cdot y = y \cdot x)$ - Prawo przemienności iloczynu/sumy
|
|
9. $x+(y+z)=(x+y)+z\cap x(yz)=(xy)z$
|
|
10. $x(y+z)=xy+xz\cap x+(yz)=x+y \cdot x+z$ - Rozdzielność iloczynu względem sumy
|
|
|
|
# Prawa Pochłaniania
|
|
1. $x+xy=x \cap x(x+y)=x$
|
|
2. $\forall x,y \in B [x+\bar x y = x+y]\cap[x(\bar x+y)=xy]$
|
|
|
|
# Prawo Wklejania
|
|
1. $(yx+\bar x=y)\cap[(y+x)(y+\bar x)=y]$
|
|
|
|
%%za a+a=a^2 ban na życie%%
|
|
|
|
```
|
|
\documentclass{article}
|
|
\usepackage[rgb]{xcolor}
|
|
\usepackage{karnaugh-map}
|
|
\usepackage{pgfplots}
|
|
\pgfplotsset{compat=1.16}
|
|
\definecolor{mycolor0000}{HTML}{F70400}
|
|
\definecolor{mycolor0100}{HTML}{AA0154}
|
|
\definecolor{mycolor1100}{HTML}{5600AB}
|
|
\definecolor{mycolor1000}{HTML}{0003FB}
|
|
\definecolor{mycolor0001}{HTML}{FF5500}
|
|
\definecolor{mycolor0101}{HTML}{AA5455}
|
|
\definecolor{mycolor1101}{HTML}{5555AB}
|
|
\definecolor{mycolor1001}{HTML}{0055FE}
|
|
\definecolor{mycolor0011}{HTML}{FFAA01}
|
|
\definecolor{mycolor0111}{HTML}{AAA956}
|
|
\definecolor{mycolor1111}{HTML}{56AAAA}
|
|
\definecolor{mycolor1011}{HTML}{00AAFF}
|
|
\definecolor{mycolor0010}{HTML}{FEFF02}
|
|
\definecolor{mycolor0110}{HTML}{A9FF54}
|
|
\definecolor{mycolor1110}{HTML}{55FFAA}
|
|
\definecolor{mycolor1010}{HTML}{0FF6FF}
|
|
|
|
|
|
\pgfplotsset{colormap={BR}{%
|
|
color(0)=(mycolor0000) color(1)=(mycolor0100) color(2)=(mycolor1100) color(3)=(mycolor1000)
|
|
color(4)=(mycolor0001) color(5)=(mycolor0101) color(6)=(mycolor1101) color(7)=(mycolor1001)
|
|
color(8)=(mycolor0011) color(9)=(mycolor0111) color(10)=(mycolor1111) color(11)=(mycolor1011)
|
|
color(12)=(mycolor0010) color(13)=(mycolor0110) color(14)=(mycolor1110) color(15)=(mycolor1010)
|
|
}}
|
|
\begin{document}
|
|
|
|
\begin{tikzpicture}[font=\small\sffamily]
|
|
\begin{axis}
|
|
[hide axis,shader=flat corner,%colormap name=BR,
|
|
plot box ratio = 1 6 1,
|
|
view = {0}{15}]
|
|
\addplot3[surf,
|
|
samples=32,point meta={int(mod(-atan2(y,x)+45+360,360)/90)+
|
|
4*int(mod(atan2(z,sqrt(x^2+y^2)-2)+360+180,360)/90)
|
|
},domain=0:360,y domain=0:360,
|
|
z buffer=sort]
|
|
({(2+cos(x))*cos(y+90)},
|
|
{(2+cos(x))*sin(y+90)},
|
|
{sin(x)});
|
|
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{cos(45)}) {0111};
|
|
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{0.15-cos(45)}) {0101};
|
|
\fill ({(2-cos(45))*cos(90-50)},{(2-cos(45))*sin(90-50)},{cos(80)}) circle (1mm);
|
|
\end{axis}
|
|
\end{tikzpicture}
|
|
%
|
|
\begin{karnaugh-map}[4][4][1][][]
|
|
\end{karnaugh-map}
|
|
\end{document}
|
|
```
|
|
```tikz
|
|
\usepackage{karnaugh}
|
|
\usepackage{pgfplots}
|
|
\begin{axis}
|
|
[hide axis,shader=flat corner,
|
|
plot box ratio = 1 6 1,
|
|
view = {0}{15}]
|
|
\addplot3[surf,
|
|
samples=32,point meta={int(mod(-atan2(y,x)+45+360,360)/90)+
|
|
4*int(mod(atan2(z,sqrt(x^2+y^2)-2)+360+180,360)/90)
|
|
},domain=0:360,y domain=0:360,
|
|
z buffer=sort]
|
|
({(2+cos(x))*cos(y+90)},
|
|
{(2+cos(x))*sin(y+90)},
|
|
{sin(x)});
|
|
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{cos(45)}) {0111};
|
|
\node at ({(2+cos(45))*cos(-90)},{(2+cos(45))*sin(-90)},{0.15-cos(45)}) {0101};
|
|
\fill ({(2-cos(45))*cos(90-50)},{(2-cos(45))*sin(90-50)},{cos(80)}) circle (1mm);
|
|
\end{axis}
|
|
```
|