diff --git a/out/report_t-2.pdf b/out/report_t-2.pdf index a8b6865..bdbe263 100644 Binary files a/out/report_t-2.pdf and b/out/report_t-2.pdf differ diff --git a/out/report_t-2.synctex.gz b/out/report_t-2.synctex.gz index ca15886..5b2358b 100644 Binary files a/out/report_t-2.synctex.gz and b/out/report_t-2.synctex.gz differ diff --git a/report_t-2.tex b/report_t-2.tex index 861f4d6..17e4f13 100644 --- a/report_t-2.tex +++ b/report_t-2.tex @@ -1,4 +1,4 @@ -\documentclass[japanese,xelatex,a4paper,10.5pt,ja=standard]{bxjsarticle} +\documentclass[japanese,xelatex,a4paper,10.5pt,ja=standard,draft]{bxjsarticle} \usepackage{tex/preamble} \usepackage{tex/experiment-title} @@ -53,4 +53,6 @@ \section{まとめ} 今回の実験で以下の事実を確認した: + + \printbibliography[title={参考文献}]{} \end{document} diff --git a/sections/t-2/exp-result.tex b/sections/t-2/exp-result.tex index df930bb..f9de018 100644 --- a/sections/t-2/exp-result.tex +++ b/sections/t-2/exp-result.tex @@ -185,7 +185,7 @@ \begin{table}[H] \centering \caption{Observed Truth Table of $x = \overline{(a \cdot b) \cdot (c \cdot d)}$} - \label{tab:a1-2-res-tt} + \label{tab:a1-4-res-tt} \begin{tabular}{ccccc} \hline a & b & c & d & x \\ diff --git a/sections/t-2/reflection.tex b/sections/t-2/reflection.tex index b2c69b5..c2646a4 100644 --- a/sections/t-2/reflection.tex +++ b/sections/t-2/reflection.tex @@ -1,6 +1,264 @@ \section{考察} -\subsection{課題1-1} +\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} + + diff --git a/sections/t-2/theory.tex b/sections/t-2/theory.tex index 09b3bd9..2eb8ca3 100644 --- a/sections/t-2/theory.tex +++ b/sections/t-2/theory.tex @@ -5,7 +5,7 @@ ディジタルとは最小単位が存在する物理量であり, 連続的で最小単位が存在しないアナログと対になる. この最小単位というのは時間や電圧などの刻み幅を決めるもので分解能ともいう. 分解能を高くすれば, 真の値と観測値の誤差が小さくなる. ディジタルには「誰が測っても同じになる」ことと「多少ノイズが混じっても大丈夫」という長所があり, 逆に「最小単位より小さいものは測れない」という短所がある. -ディジタルにより, 現実世界の様々な現象をある一定の精度で数値的に解析・再現することが出来るようになった. +ディジタルにより, 現実世界の様々な現象をある一定の精度で数値的に解析・再現することが出来るようになった\supercite{digital-circuit:digital}. \begin{figure}[tbh] \centering @@ -25,14 +25,13 @@ \subsection{二進数} 二進数とは0と1などの二種類の記号を用いた数の表記法である. -これにより電気のオン・オフなど回路で扱いやすい形で様々な数を表すことが出来るようになった. -そして, ディジタルの登場により, コンピュータが発展していった. +これにより電気のオン・オフなど回路で扱いやすい形で様々な数を表すことが出来るようになった\supercite{digital-circuit:basic-logic}. \subsection{ブール代数} ブール代数とは二値化された数に対し, 演算子や法則を定義した数学の分野である. -ブール代数では基本的な演算子は論理和, 論理積, 論理否定である. -これらの演算子の演算結果は\cref{tab:truth-table-basic}のような真理値表でまとめることが出来る. +ブール代数では基本的な演算子は論理和, 論理積, 論理否定である\supercite{digital-circuit:basic-logic}. +これらの演算子の演算結果は\cref{tab:truth-table-basic}のような真理値表でまとめることが出来る\supercite{digital-circuit:truth-table}. \begin{table}[!ht] \caption{Truth Tables of Basic Logic Operations} @@ -95,7 +94,7 @@ ブール代数の代表的な定理としてド・モルガンの定理がある. -この定理は「あるブール式の各変数を否定し, 式の中の論理積と論理和を入れ替えた式は, 全体を否定した式と同じ値をとる」というもので\cref{equ:deMorgan}のような式で表現される. +この定理は「あるブール式の各変数を否定し, 式の中の論理積と論理和を入れ替えた式は, 全体を否定した式と同じ値をとる」というもので\cref{equ:deMorgan}のような式で表現される\supercite{digital-circuit:basic-logic}. \begin{equation}\label{equ:deMorgan} \overline{f(x_1, x_2, \dotsc, +, \cdot)} = f(\overline{x_1}, \overline{x_2}, \dotsc, \cdot{}, +) @@ -103,7 +102,7 @@ \subsection{論理ゲート} -論理ゲートは論理演算を電気回路で表現したもので, 回路記号は\cref{fig:logic-gate-symbols}で表される. +論理ゲートは論理演算を電気回路で表現したもので, 回路記号は\cref{fig:logic-gate-symbols}で表される\supercite{digital-circuit:gate-ic}. \begin{figure}[tbh] \centering @@ -152,17 +151,17 @@ \label{fig:karnaugh-map-example} \end{figure} -カルノー図から隣接する1のセルを「くくる」と論理式を簡略化することが出来る. +カルノー図から隣接する1のセルを「くくる」と論理式を簡略化することが出来る\supercite{digital-circuit:karnaugh-map}. 今回の例では$a \cdot b \cdot \bar{c}$のセルと$a \cdot \bar{b} \cdot \bar{c}$のセルでは$b$の値によらず1になっているので, くくって $x = (a \cdot \bar{c}) + (\bar{a} \cdot b \cdot c)$を得る. \subsection{順序回路} 論理回路には現在の状態と入力によって次の状態へ変化する回路が存在する. これらの回路は順序回路と呼ばれている. -例えば, ある状態Aで入力が0の時, 出力を1にし状態Bへ, 入力が1の時, 出力を0にし状態Cへ遷移するというような回路のことである. +例えば, ある状態Aで入力が0の時, 出力を1にし状態Bへ, 入力が1の時, 出力を0にし状態Cへ遷移するというような回路のことである\supercite{digital-circuit:sequential-logic}. 順序回路の動作を説明するには状態遷移図や状態遷移表が有効である. 状態遷移図は各状態をノード, 入力/出力の順で表記された状態の遷移をエッジとする有向グラフとして表現される. -状態遷移表は入力と現状態が次にどの状態と出力をするのかを表にまとめたものである. +状態遷移表は入力と現状態が次にどの状態と出力をするのかを表にまとめたものである\supercite{digital-logic:state-transition}. 前述の例を状態遷移図と状態遷移表で表現するとそれぞれ\cref{fig:state-transition-graph-example}と\cref{tab:state-tarnsition-table-example}となる. \begin{table}[!ht]