{ "metadata": { "name": "", "signature": "sha256:8e00642f6ddacd443d3eb4854826bbe2637913084178e4532673ce919908eaea" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 11 - Logic Circuits" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E1 - Pg 340" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Caption:Determine output for given logic circuit\n", "A=1.\n", "B=0\n", "C=1.\n", "D=1.\n", "c=A-1.\n", "n=c#Output of NOT gate\n", "a=B*C*D#Output of AND gate\n", "o=c+(B*C*D)#Output of OR gate\n", "print '%s %.f' %('Output for given logic circuit is=',o)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output for given logic circuit is= 0\n" ] } ], "prompt_number": 1 } ], "metadata": {} } ] }