{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 単純な論理回路" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "パーセプトロンを使って、論理回路を作ってみよう。\n", "$$\n", " y = \n", " \\begin{cases}\n", " 0 \\quad (w_1 x_1 + w_2 x_2 \\leqq \\theta) \\\\\n", " 1 \\quad (w_1 x_1 + w_2 x_2 < \\theta) \\\\\n", " \\end{cases}\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## ANDゲート\n", "\n", "| $x_1$ | $x_2$ | $y$ |\n", "| ----- | ----- | --- |\n", "| $0$ | $0$ | $0$ |\n", "| $1$ | $0$ | $0$ |\n", "| $0$ | $1$ | $0$ |\n", "| $1$ | $1$ | $1$ |" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## NAND ゲート と OR ゲート\n", "\n", "NANDゲート\n", "\n", "| $x_1$ | $x_2$ | $y$ |\n", "| ----- | ----- | --- |\n", "| $0$ | $0$ | $1$ |\n", "| $1$ | $0$ | $1$ |\n", "| $0$ | $1$ | $1$ |\n", "| $1$ | $1$ | $0$ |\n", "\n", "\n", "ORゲート\n", "\n", "| $x_1$ | $x_2$ | $y$ |\n", "| ----- | ----- | --- |\n", "| $0$ | $0$ | $0$ |\n", "| $1$ | $0$ | $1$ |\n", "| $0$ | $1$ | $1$ |\n", "| $1$ | $1$ | $1$ |" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.3" } }, "nbformat": 4, "nbformat_minor": 4 }