course: 1.1.1, 1.1.2
This commit is contained in:
BIN
circuit/25-2/course_project/README.jpg
Normal file
BIN
circuit/25-2/course_project/README.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
55
circuit/25-2/course_project/drawio/1.1.1.drawio
Normal file
55
circuit/25-2/course_project/drawio/1.1.1.drawio
Normal file
@ -0,0 +1,55 @@
|
||||
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36" version="28.2.8">
|
||||
<diagram name="Страница — 1" id="sO6mBrgkGhevZXLxDi5B">
|
||||
<mxGraphModel dx="744" dy="471" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-1" value="A" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="50" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-2" value="B" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="100" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-3" value="C" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="150" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-4" value="D" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="230" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-6" value="начало" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.terminator;whiteSpace=wrap;" vertex="1" parent="1">
|
||||
<mxGeometry x="250" y="50" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-7" value="RA, RB" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0.23;" vertex="1" parent="1">
|
||||
<mxGeometry x="242.5" y="100" width="75" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-12" value="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="250" y="20" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-16" value="конец" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.terminator;whiteSpace=wrap;" vertex="1" parent="1">
|
||||
<mxGeometry x="250" y="230" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-41" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="sDe38s09ArQUHBlkgSVm-7">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="430" y="280" as="sourcePoint" />
|
||||
<mxPoint x="280" y="150" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-42" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="sDe38s09ArQUHBlkgSVm-6" target="sDe38s09ArQUHBlkgSVm-7">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="430" y="280" as="sourcePoint" />
|
||||
<mxPoint x="480" y="230" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-53" value="i = 2 * a1 + a0<div>CF = bi</div><div>bi = 1</div>" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=2;" vertex="1" parent="1">
|
||||
<mxGeometry x="235" y="150" width="90" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-54" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="sDe38s09ArQUHBlkgSVm-53" target="sDe38s09ArQUHBlkgSVm-16">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="360" y="280" as="sourcePoint" />
|
||||
<mxPoint x="410" y="230" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
55
circuit/25-2/course_project/drawio/1.1.2.drawio
Normal file
55
circuit/25-2/course_project/drawio/1.1.2.drawio
Normal file
@ -0,0 +1,55 @@
|
||||
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36" version="28.2.8">
|
||||
<diagram name="Страница — 1" id="sO6mBrgkGhevZXLxDi5B">
|
||||
<mxGraphModel dx="744" dy="471" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-1" value="A" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="50" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-2" value="B" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="100" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-3" value="C" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="150" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-4" value="D" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="160" y="230" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-6" value="начало" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.terminator;whiteSpace=wrap;" vertex="1" parent="1">
|
||||
<mxGeometry x="250" y="50" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-7" value="RA, RB" style="shape=parallelogram;html=1;strokeWidth=2;perimeter=parallelogramPerimeter;whiteSpace=wrap;rounded=1;arcSize=12;size=0.23;" vertex="1" parent="1">
|
||||
<mxGeometry x="242.5" y="100" width="75" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-12" value="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="250" y="20" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-16" value="конец" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.terminator;whiteSpace=wrap;" vertex="1" parent="1">
|
||||
<mxGeometry x="250" y="230" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-41" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="sDe38s09ArQUHBlkgSVm-7">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="430" y="280" as="sourcePoint" />
|
||||
<mxPoint x="280" y="150" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-42" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="sDe38s09ArQUHBlkgSVm-6" target="sDe38s09ArQUHBlkgSVm-7">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="430" y="280" as="sourcePoint" />
|
||||
<mxPoint x="480" y="230" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-53" value="i = 2 * a1 + a0<div>CF = bi</div><div>bi = 1</div>" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=2;" vertex="1" parent="1">
|
||||
<mxGeometry x="235" y="150" width="90" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="sDe38s09ArQUHBlkgSVm-54" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="sDe38s09ArQUHBlkgSVm-53" target="sDe38s09ArQUHBlkgSVm-16">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="360" y="280" as="sourcePoint" />
|
||||
<mxPoint x="410" y="230" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
BIN
circuit/25-2/course_project/img/1.1.1.drawio.png
Normal file
BIN
circuit/25-2/course_project/img/1.1.1.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
BIN
circuit/25-2/course_project/img/1.1.2.drawio.png
Normal file
BIN
circuit/25-2/course_project/img/1.1.2.drawio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@ -25,6 +25,8 @@
|
||||
\usepackage{float}
|
||||
\floatstyle{plaintop}
|
||||
\restylefloat{table}
|
||||
\usepackage{makecell}
|
||||
\usepackage[table]{xcolor}
|
||||
|
||||
\begin{document}
|
||||
|
||||
@ -88,8 +90,113 @@
|
||||
\subsubsection{Алгоритм операции УМНОЖЕНИЕ}
|
||||
Умножение выполняется по алгоритму умножения с младших разрядов множителя и сдвигом суммы частичных произведений вправо с одним корректирующим шагом. Данный алгоритм при представлении сомножителей в прямом коде можно выразить следующей формулой:
|
||||
|
||||
$$[A]_{\text{п}} = a_3, a_2 a_1 a_0$$
|
||||
|
||||
\begin{equation}
|
||||
[A]_{\text{п}} \cdot [B]_{\text{п}}=(..((0 + A \cdot b_0) \cdot p^{-1} + A \cdot b_1) \cdot p^{-1} + ... + A \cdot b_{n-1}) \cdot p^{-1}
|
||||
[A]_{\text{п}} \cdot [B]_{\text{п}}=(..((0 + A \cdot b_0) \cdot p^{-1} + A \cdot b_1) \cdot p^{-1} + ... + A \cdot b_{n-1}) \cdot p^{3}
|
||||
\end{equation}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\centering
|
||||
\makecell[l]{
|
||||
Пример 1: \\
|
||||
$[\mathrm{A}]_\mathrm{п} = 0.111 = 7$\\
|
||||
$[\mathrm{B}]_\mathrm{п} = 0.111 = 7$\\
|
||||
$\mathrm{Зн} = 0 \oplus 0 = 0$\\
|
||||
$[\mathrm{A}*\mathrm{B}]_\mathrm{п} = 0.0110001 = 49$
|
||||
}
|
||||
\end{minipage}
|
||||
\begin{minipage}{0.69\textwidth}
|
||||
\centering
|
||||
\begin{tabular}{c|c|c|c|c|c|c|c|c|c}
|
||||
& & 0 & 1 & 1 & 1 & & & & \makecell[l]{RA} \\
|
||||
& & 0 & 1 & 1 & 1 & & & & \makecell[l]{RB}\\ \hline
|
||||
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \makecell[l]{RR = 0} \\
|
||||
$b_0 = 1$ & & 0 & 1 & 1 & 1 & & & & \makecell[l]{RA} \\ \hline
|
||||
& 0 & 0 & 1 & 1 & 1 & 0 & 0 & 0 & \makecell[l]{RR} \\
|
||||
& 0 & 0 & 0 & 1 & 1 & 1 & 0 & 0 & \makecell[l]{RR >> 1} \\
|
||||
$b_1 = 1$ & & 0 & 1 & 1 & 1 & & & & \makecell[l]{RA} \\ \hline
|
||||
& 0 & 1 & 0 & 1 & 0 & 1 & 0 & 0 & \makecell[l]{RR} \\
|
||||
& 0 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & \makecell[l]{RR >> 1} \\
|
||||
$b_2 = 1$ & & 0 & 1 & 1 & 1 & & & & \makecell[l]{RA} \\ \hline
|
||||
& 0 & 1 & 1 & 0 & 0 & 0 & 1 & 0 & \makecell[l]{RR} \\
|
||||
$\mathrm{Знак}$&\cellcolor{lightgray}0 & 0 & 1 & 1 & 0 & 0 & 0 & 1 & \makecell[l]{RR >> 1}
|
||||
\end{tabular}
|
||||
\end{minipage}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\centering
|
||||
\makecell[l]{
|
||||
Пример 2: \\
|
||||
$[\mathrm{A}]_\mathrm{п} = 0.111 = 7$\\
|
||||
$[\mathrm{B}]_\mathrm{п} = 1.101 = -5$\\
|
||||
$\mathrm{Зн} = 1 \oplus 0 = 1$\\
|
||||
$[\mathrm{A}*\mathrm{B}]_\mathrm{п} = 1.0100011 = -35$
|
||||
}
|
||||
\end{minipage}
|
||||
\begin{minipage}{0.69\textwidth}
|
||||
\centering
|
||||
\begin{tabular}{c|c|c|c|c|c|c|c|c|c}
|
||||
& & 0 & 1 & 1 & 1 & & & & \makecell[l]{RA} \\
|
||||
& & 1 & 1 & 0 & 1 & & & & \makecell[l]{RB}\\ \hline
|
||||
& 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \makecell[l]{RR = 0} \\
|
||||
$b_0 = 1$ & & 0 & 1 & 1 & 1 & & & & \makecell[l]{RA} \\ \hline
|
||||
& 0 & 0 & 1 & 1 & 1 & 0 & 0 & 0 & \makecell[l]{RR} \\
|
||||
& 0 & 0 & 0 & 1 & 1 & 1 & 0 & 0 & \makecell[l]{RR >> 1} \\
|
||||
$b_1 = 0$ & \multicolumn{8}{c}{\text{пропуск такта суммирования}} & \\ \hline
|
||||
& 0 & 0 & 0 & 1 & 1 & 1 & 0 & 0 & \makecell[l]{RR} \\
|
||||
& 0 & 0 & 0 & 0 & 1 & 1 & 1 & 0 & \makecell[l]{RR >> 1} \\
|
||||
$b_2 = 1$ & & 0 & 1 & 1 & 1 & & & & \makecell[l]{RA} \\ \hline
|
||||
& 0 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & \makecell[l]{RR} \\
|
||||
$\mathrm{Знак}$&\cellcolor{lightgray}1 & 0 & 1 & 0 & 0 & 0 & 1 & 1 & \makecell[l]{RR >> 1}
|
||||
\end{tabular}
|
||||
\end{minipage}
|
||||
\end{figure}
|
||||
|
||||
\newpage
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
Представим рассмотренный метод умножения в виде схемы алгоритма \\
|
||||
\begin{minipage}[t]{\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=0.6\textwidth]{1.1.1.drawio}
|
||||
\caption{Блок схема умножения}
|
||||
\label{1.1.1}
|
||||
\end{minipage}
|
||||
\end{figure}
|
||||
|
||||
\subsubsection{Проверка бита с установкой его в единицу}
|
||||
Операция проверяет бит в RB по адресу из RA, устанавливает флаг CF, если значение бита в операнде 1, значение бита в операнде устанавливается в 1
|
||||
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\makecell{
|
||||
Пример 1: \\
|
||||
$RA = 0000$ \\
|
||||
$RB = 0001$ \\
|
||||
$CF = 1$ \\
|
||||
$RB = 0001$
|
||||
}
|
||||
\makecell{
|
||||
Пример 2: \\
|
||||
$RA = 0001$ \\
|
||||
$RB = 0001$ \\
|
||||
$CF = 0$ \\
|
||||
$RB = 0011$
|
||||
}
|
||||
\makecell{
|
||||
\begin{minipage}[t]{0.3\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=\textwidth]{1.1.2.drawio}
|
||||
\caption{Блок схема проверки бита с установкой в единицу}
|
||||
\label{1.1.2}
|
||||
\end{minipage}
|
||||
}
|
||||
\end{figure}
|
||||
|
||||
\end{document}
|
||||
|
||||
Reference in New Issue
Block a user