\section{考察} \subsection{課題 1-1} この実験ではTC74HC08のANDゲートを使用した. ANDゲートは等価回路は\cref{fig:and-gate-equi}のようにスイッチが2つ直列に接続された回路で, 両方のスイッチが閉じた時のみ, Hレベルを出力する. \begin{figure}[H] \centering \begin{circuitikz} \ctikzset{switches/scale=1} \ctikzset{resistors/scale=1} \ctikzset{diodes/scale=1} \draw (0,0) node[vcc]{$V_{DD}$} to [normal open switch, l={$A$}] ++(2,0) to [normal open switch, l={$B$}] ++(2,0) coordinate (out) to [R] ++(2,0) node[ground]{}; \draw (out) to [short, *-o] ++(0,0.5) node[above]{Output}; \end{circuitikz} \caption{AND Gate Equivalent Circuit} \label{fig:and-gate-equi} \end{figure} このことから, \cref{tab:a1-1-res-tt}で示した結果は両方の入力がHレベルの時だけ出力がHレベルとなっているため, 理論と一致することが分かる. \subsection{課題 1-2} \Cref{tab:a1-2-res-tt}より, 全ての入力がHレベルの時のみ出力がLレベルとなっている. NANDゲートはANDゲートの否定なので, 結果は理屈に沿っている. \subsection{課題 1-3} \Cref{fig:a1-3-cd}より, 各ゲートの出力は\cref{equ:output-of-each-gate-a1-3}となる. \begin{equation} \label{equ:output-of-each-gate-a1-3} \begin{split} O_1 &= A_{\text{IN}} \cdot B_{\text{IN}} \\ O_2 &= C_{\text{IN}} \cdot D_{\text{IN}} \\ D_p &= O_1 \cdot O_2 = (A_{\text{IN}} \cdot B_{\text{IN}}) \cdot (C_{\text{IN}} \cdot D_{\text{IN}}) \end{split} \end{equation} \Cref{equ:output-of-each-gate-a1-3}より, 真理値表は\cref{tab:theoretical-a1-3}となる. \begin{table}[H] \centering \caption{Theoretical Truth Table of $D_p = (A_{\text{IN}} \cdot B_{\text{IN}}) \cdot (C_{\text{IN}} \cdot D_{\text{IN}})$} \label{tab:theoretical-a1-3} \begin{tabular}{ccccc} \hline $A_{\text{IN}}$ & $B_{\text{IN}}$ & $C_{\text{IN}}$ & $D_{\text{IN}}$ & $D_p$ \\ \hline 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 1 & 0 \\ 1 & 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 1 & 0 \\ 1 & 1 & 1 & 1 & 1 \\ \hline \end{tabular} \end{table} \Cref{tab:theoretical-a1-3}より, 出力$D_p$が1となるのは全入力が1の時だけであり, この条件を論理式にすると\cref{equ:a1-3-final}となり, \cref{equ:output-of-each-gate-a1-3}で示した$D_p$と等価な式になる. \begin{equation} \label{equ:a1-3-final} d_p = A_{\text{IN}} \cdot B_{\text{IN}} \cdot C_{\text{IN}} \cdot D_{\text{IN}} \end{equation} \subsection{課題 1-4} \Cref{fig:a1-4-cd}の出力は\cref{equ:a1-4-out}で示され, ド・モルガンの定理で変形していくと\cref{equ:a1-4-de-morganed}となる. \begin{equation} \label{equ:a1-4-out} D_p = \overline{(A_{\text{IN}} \cdot B_{\text{IN}}) \cdot (C_{\text{IN}} \cdot D_{\text{IN}})} \end{equation} \begin{equation} \label{equ:a1-4-de-morganed} \begin{split} D_p &= \overline{(A_{\text{IN}} \cdot B_{\text{IN}}) \cdot (C_{\text{IN}} \cdot D_{\text{IN}})} = \overline{A_{\text{IN}} \cdot B_{\text{IN}}} + \overline{C_{\text{IN}} \cdot D_{\text{IN}}} \\ &= \overline{A_{\text{IN}}} + \overline{B_{\text{IN}}} + \overline{C_{\text{IN}}} + \overline{D_{\text{IN}}} = \overline{A_{\text{IN}} \cdot B_{\text{IN}} \cdot C_{\text{IN}} \cdot D_{\text{IN}}} \end{split} \end{equation} \Cref{equ:a1-4-de-morganed}より, \Cref{tab:a1-4-res-tt}の真理値表は\cref{tab:a1-2-res-tt}のものと一致している. 論理式の等価は真理値表の一致を意味するので, \cref{equ:a1-4-de-morganed}で示した論理式の真理値表も全て一致する. \subsection{課題 2-1} デコーダ回路とはある意味を持つコードを別の対応するコードへの写像を取る回路のことである. 今回の場合は4ビットの二進数から7セグメントLEDの点灯パターンへの写像を論理回路で実装している. 7セグメントLEDデコーダのTC4511はそれぞれの出力が論理式の出力となってる. \subsection{課題 2-2B} この回路を制作するにあたって, まずは\cref{tab:a2-2b-tt-design}の真理値表を考える. \begin{table}[H] \centering \caption{Truth Table for Designing 7 Segment Hexadecimal Decoder} \label{tab:a2-2b-tt-design} \begin{tabular}{ccccccccccc} \hline a & b & c & d & A & B & C & D & E & F & G \\ \hline 0 & 1 & 0 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 & 1 & 1 & 1 & 1 \\ 0 & 0 & 1 & 1 & 1 & 0 & 0 & 1 & 1 & 1 & 0 \\ 1 & 0 & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 0 & 1 \\ 0 & 1 & 1 & 1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 1 & 1 & 1 \\ \hline \end{tabular} \end{table} ここで, dの値が全てHレベルであるので, 一旦省略する. この真理値表にもとずいたそれぞれのセグメントの論理式は\cref{equ:a2-2b-equ-design}となる. \begin{equation} \label{equ:a2-2b-equ-design} \begin{split} A &= \overline{(a \cdot b \cdot \bar{c}) + (a \cdot \bar{b} \cdot c)} \\ B &= (\bar{a} \cdot b \cdot \bar{c}) + (a \cdot \bar{b} \cdot c) \\ C &= B + (a \cdot b \cdot \bar{c}) \\ D &= \overline{(\bar{a} \cdot b \cdot \bar{c}) + (a \cdot b \cdot c)} \\ E &= 1 \\ F &= \overline{a \cdot \bar{b} \cdot c} \\ G &= \overline{\bar{a} \cdot \bar{b} \cdot c} \end{split} \end{equation} これら論理式にカルノー図を適応したが, もとが十分簡略化されているためか, あまり有用ではなかった. かわりに, 複数式の共通する項を1つのユニットとして共有して使用することにした. 共通項は\cref{equ:a2-2b-common}とした. \begin{equation} \label{equ:a2-2b-common} \begin{split} X &= (a \cdot b \cdot \bar{c}) \\ Y &= (a \cdot \bar{b} \cdot c) \\ Z &= (\bar{a} \cdot b \cdot \bar{c}) \end{split} \end{equation} また, 禁止条件が入力された際の真理値値表は\cref{tab:a2-2b-not-allowed}となった. \begin{table}[H] \centering \caption{Truth Table for Disallowed Conditions} \label{tab:a2-2b-not-allowed} \begin{tabular}{ccccc} \hline a & b & c & d & $\overline{\text{EN}}$ \\ \hline * & * & * & 0 & 1 \\ * & 0 & 0 & 1 & 1 \\ \hline \end{tabular} \end{table} 上記の真理値表から論理式を作成すると\cref{equ:a2-2b-not-allowed-equ}となった. \begin{equation} \label{equ:a2-2b-not-allowed-equ} \text{EN} = d \cdot (b + c) \end{equation} これら論理式から回路を制作すると\cref{fig:a2-2b-cd}となった. \begin{figure}[tbh] \centering \begin{circuitikz}[scale=0.7] \ctikzset{logic ports=ieee} \ctikzset{logic ports/scale=0.7} \ctikzset{resistors/scale=0.7} \node [and port, number inputs=3] at (-5,4) (X) {}; \node [and port, number inputs=3] at (-5,2) (Y) {}; \node [and port, number inputs=3] at (-5,0) (Z) {}; \node [nor port] at (0,4) (A) {}; \node [or port] at (0,2) (B) {}; \node [or port] at (0,0) (C) {}; \node [and port, number inputs=3] at (5,4) (m) {}; \node [nor port, anchor=in 2] at ($(m.out) + (1,0)$) (D) {}; \node [not port] at (5,2) (F) {}; \node [nand port, number inputs=3] at (5,0) (G) {}; \node [notcirc,left] at (X.bin 3) {}; \node [notcirc,left] at (Y.bin 2) {}; \node [notcirc,left] at (Z.bin 1) {}; \node [notcirc,left] at (Z.bin 3) {}; \node [notcirc,left] at (G.bin 1) {}; \node [notcirc,left] at (G.bin 2) {}; \draw (X.in 1) ++(-0.5,0) node[left]{a} to [short, o-] (X.in 1); \draw (X.in 2) ++(-0.5,0) node[left]{b} to [short, o-] (X.in 2); \draw (X.in 3) ++(-0.5,0) node[left]{c} to [short, o-] (X.in 3); \draw (X.out) to [short, -o] ++(0.5,0) node[right]{X}; \draw (Y.in 1) ++(-0.5,0) node[left]{a} to [short, o-] (Y.in 1); \draw (Y.in 2) ++(-0.5,0) node[left]{b} to [short, o-] (Y.in 2); \draw (Y.in 3) ++(-0.5,0) node[left]{c} to [short, o-] (Y.in 3); \draw (Y.out) to [short, -o] ++(0.5,0) node[right]{Y}; \draw (Z.in 1) ++(-0.5,0) node[left]{a} to [short, o-] (Z.in 1); \draw (Z.in 2) ++(-0.5,0) node[left]{b} to [short, o-] (Z.in 2); \draw (Z.in 3) ++(-0.5,0) node[left]{c} to [short, o-] (Z.in 3); \draw (Z.out) to [short, -o] ++(0.5,0) node[right]{Z}; \draw (A.in 1) ++(-0.5,0) node[left]{X} to [short, o-] ++(0.5,0); \draw (A.in 2) ++(-0.5,0) node[left]{Y} to [short, o-] ++(0.5,0); \draw (A.out) to [short, -o] ++(0.5,0) node[right]{A}; \draw (B.in 1) ++(-0.5,0) node[left]{Y} to [short, o-] ++(0.5,0); \draw (B.in 2) ++(-0.5,0) node[left]{Z} to [short, o-] ++(0.5,0); \draw (B.out) to [short, -o] ++(0.5,0) node[right]{B}; \draw (C.in 1) ++(-0.5,0) node[left]{B} to [short, o-] ++(0.5,0); \draw (C.in 2) ++(-0.5,0) node[left]{X} to [short, o-] ++(0.5,0); \draw (C.out) to [short, -o] ++(0.5,0) node[right]{C}; \draw (m.in 1) ++(-0.5,0) node[left]{a} to [short, o-] ++(0.5,0); \draw (m.in 2) ++(-0.5,0) node[left]{b} to [short, o-] ++(0.5,0); \draw (m.in 3) ++(-0.5,0) node[left]{c} to [short, o-] ++(0.5,0); \draw (m.out) -- (D.in 2); \draw (D.in 1) ++(-0.5,0) node[left]{Z} to [short, o-] ++(0.5,0); \draw (D.out) to [short, -o] ++(0.5,0) node[right]{D}; \draw (F.in) ++(-0.5,0) node[left]{Y} to [short, o-] ++(0.5,0); \draw (F.out) to [short, -o] ++(0.5,0) node[right]{F}; \draw (G.in 1) ++(-0.5,0) node[left]{a} to [short, o-] (G.in 1); \draw (G.in 2) ++(-0.5,0) node[left]{b} to [short, o-] (G.in 2); \draw (G.in 3) ++(-0.5,0) node[left]{c} to [short, o-] (G.in 3); \draw (G.out) to [short, -o] ++(0.5,0) node[right]{G}; \draw (G.out) ++(0,-2) node[above]{$\text{7seg}_\text{GND}$} to [short, o-] ++(0,-1) node[nigfete,anchor=D](Q){} (Q.S) -- ++(0,-1.3) node[ground]{} (Q.G) to [short, -*] ++(-1,0) coordinate (Qin) to [R, l={$330 \ \Omega$}] ++(0,-2) node[ground]{}; \draw (Qin) -- ++(-1,0) node[and port, anchor=out](ENAnd){}; \draw (ENAnd.in 1) to [short, -o] ++(-0.5,0) node[left]{d}; \draw (ENAnd.in 2) -- ++(-1,0) node[or port, anchor=out](ENOr){}; \draw (ENOr.in 1) to [short, -o] ++(-0.5,0) node[left]{b}; \draw (ENOr.in 2) to [short, -o] ++(-0.5,0) node[left]{c}; \end{circuitikz} \caption{Circuit Diagram of 7 Segment Hexadecimal Decoder} \label{fig:a2-2b-cd} \end{figure} \subsection{課題 3-3} \subsection{課題 3-4} \subsection{応用課題 A}