course: tables, tags and refs

This commit is contained in:
2025-12-23 19:49:46 +03:00
parent a29bd250ab
commit 01eccd02ea
11 changed files with 345 additions and 579 deletions

View File

@ -4,7 +4,11 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Tinos:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<script src="https://fred-wang.github.io/TeXZilla/TeXZilla-min.js"></script>
</head>
<body>
@ -34,15 +38,110 @@
<div class="center">Москва — 2025/2026</div>
</div>
</section>
<section>
<h1>Проектирование блока операций</h1>
<h2>Примеры и алгоритмы выполнения операций</h2>
<h3>Алгоритм операции УМНОЖЕНИЕ</h3>
<section style="background-image: url('README.jpg'); background-size: cover;">
</section>
<section>
<section class="col">
<h1>Проектирование блока операций</h1>
<h2>Примеры и алгоритмы выполнения операций</h2>
<h3>Алгоритм операции УМНОЖЕНИЕ</h3>
<p>
Умножение выполняется по алгоритму умножения с младших разрядов множителя и сдвигом
суммы частичных произведений вправо с одним корректирующим шагом. Данный алгоритм при
представлении сомножителей в прямом коде можно выразить следующей формулой:
</p>
<div class="tex">
$$[A]_{\text{п}} = a_3, a_2 a_1 a_0$$
$$[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}$$
</div>
<div class="row">
<div class="col x-center tex" style="gap: 0; flex: 1">
Пример 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$
</div>
<table
data-alt="Пример умножения 1"
data-gen="
,,0,1,1,1,,,,RA;
,,0,1,1,1,,,,RB;;
,0,$c,r$0,$c,r$0,$c,r$0,$c,r$0,0,0,0,RR=0;
b0=1,,$c,r$0,$c,r$1,$c,r$1,$c,r$1,,,,RA;;
,0,0,1,1,1,0,0,0,RR;
,0,$c,r$0,$c,r$0,$c,r$1,$c,r$1,1,0,0,RR>>1;
b1=1,,$c,r$0,$c,r$1,$c,r$1,$c,r$1,,,,RA;;
,0,1,0,1,0,1,0,0,RR;
,0,$c,r$0,$c,r$1,$c,r$0,$c,r$1,0,1,0,RR>>1;
b2=1,,$c,r$0,$c,r$1,$c,r$1,$c,r$1,,,,RA;;
,0,1,1,0,0,0,1,0,RR;
Знак,$c,b$0,0,1,1,0,0,0,1,RR>>1;
"
class="center"
style="flex: 1"
></table>
</div>
<div class="row x-stretch">
<div class="col x-center tex" style="gap: 0; flex: 1">
Пример 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$
</div>
<table
data-alt="Пример умножения 2"
data-gen="
,,0,1,1,1,,,,RA;
,,1,1,0,1,,,,RB;;
,0,$c,r$0,$c,r$0,$c,r$0,$c,r$0,0,0,0,RR=0;
b0=1,,$c,r$0,$c,r$1,$c,r$1,$c,r$1,,,,RA;;
,0,0,1,1,1,0,0,0,RR;
,0,0,0,1,1,1,0,0,RR>>1;
b1=0,$C,9$пропуск такта суммирования;;
,0,0,0,1,1,1,0,0,RR;
,0,$c,r$0,$c,r$0,$c,r$0,$c,r$1,1,1,0,RR>>1;
b2=1,,$c,r$0,$c,r$1,$c,r$1,$c,r$1,,,,RA;;
,0,1,0,0,0,1,1,0,RR;
Знак,$c,b$1,0,1,0,0,0,1,1,RR>>1;
"
class="center"
style="flex: 1"
></table>
</div>
</section>
<section class="col">
<p>Представим рассмотренный метод умножения в виде схемы алгоритма на рисунке <span data-ref="bo-mul"></span></p>
<div class="col y-center">
<img alt="Блок схема умножения" data-tag="bo-mul" src="img/bo-mul.png" style="width: 50%">
</div>
<h3>Проверка бита с установкой его в единицу</h3>
<p>Операция проверяет бит в RB по адресу из RA, устанавливает флаг CF, если значение бита в операнде 1, значение бита в операнде устанавливается в 1</p>
<div class="row y-center">
<img style="flex: 0.6" src="img/bo-set.png" alt="Блок схема проверки бита с установкой в единицу">
<div style="flex: 0.4"></div>
<div style="flex: 1" class="col x-center tex">
<div class="col" style="gap: 0">
Пример 1:
$RA = 0000$
$RB = 0001$
$CF = 1$
$RB = 0001$
</div>
<div class="col" style="gap: 0">
Пример 2:
$RA = 0001$
$RB = 0001$
$CF = 0$
$RB = 0011$
</div>
</div>
</div>
</section>
<section class="col">
<h2>Функциональная схема блока операций</h2>
<p>Функциональная схема блока операций представлена на рисунке <span data-ref="bo-func"></span></p>
<img src="img/bo-func.png" alt="Функциональная схема блока операций" data-tag="bo-func">
</section>
<script src="index.js" type="module"></script>
</body>