半加算器
(OR回路の論理回路) |
(半加算器) |
||
これが、0と1からなる数値によってデジタル信号を扱う場合の、OR計算の結果である。
{{-}}
=== NOT回路 ===
NOT回路とは、出力に、入力とは反対の結果を出す回路のことである。
つまり、
{| class="wikitable"
|- style="background-color:#cccccc"
! 入力 A !! 出力 C
|- align="center"
| H || L
|- align="center"
| L || H
|}
のような結果を出す回路である。
デジタル信号の 0 , 1 で表記すれば、NOT回路の計算は、次表になる。
{| class="wikitable"
|- style="background-color:#cccccc"
! 入力 A !! 出力 C
|- align="center"
| 1 || 0
|- align="center"
| 0 || 1
|}
{{-}}
File:Logic circuit OR 11 jp.svg|論理回路 OR 。 入力11の場合。
</gallery>
=== NOT回路の論理回路 ===
{{-}}
== 2進数の計算 ==
まず、2進数の1桁どうしの足し算の結果は、次のようになる。
{| border="0" cellspacing="0" cellpadding="0" style="background:#eeffee; border:solid 2px #cccccc; float:left;"
|- align="center"
|align="right"|
|
|
|0
|
|- align="center"
|
|align="right" style="text-decoration:underline;"|+
|
|style="text-decoration:underline;"| 0
|
|- align="center"
|
|
|
|0
|
|}
{{-}}
{| border="0" cellspacing="0" cellpadding="0" style="background:#eeffee; border:solid 2px #cccccc; float:left;"
|- align="center"
|align="right"|
|
|
|0
|
|- align="center"
|
|align="right" style="text-decoration:underline;"|+
|
|style="text-decoration:underline;"| 1
|
|- align="center"
|
|
|
|1
|
|}
{{-}}
{| border="0" cellspacing="0" cellpadding="0" style="background:#eeffee; border:solid 2px #cccccc; float:left;"
|- align="center"
|align="right"|
|
|
|1
|
|- align="center"
|
|align="right" style="text-decoration:underline;"|+
|
|style="text-decoration:underline;"| 0
|
|- align="center"
|
|
|
|1
|
|}
{{-}}
{| border="0" cellspacing="0" cellpadding="0" style="background:#eeffee; border:solid 2px #cccccc; float:left;"
|- align="center"
|align="right"|
|
|
|1
|
|- align="center"
|
|align="right" style="text-decoration:underline;"|+
|
|style="text-decoration:underline;"| 1
|
|- align="center"
|
|
|1
|0
|
|}
{{-}}
答えの十の位が1になる場合とは(つまり、くりあがり が起きる場合とは)、入力AとBが両方とも1の場合である。
つまり、くりあがり(carry)の有無を、AND回路を使って書ける。
[[File:Half adder jp.svg|thumb|半加算器。]]
この論理回路を半加算器という。
|