Logic Networks …and the card game Boolette

Slides:



Advertisements
Similar presentations
Logic Gates.
Advertisements

Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
Section 10.3 Logic Gates.
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Lecture 3. Boolean Algebra, Logic Gates
VOCABULARY  Deck or pack  Suit  Hearts  Clubs  Diamonds  Spades  Dealer  Shuffle  Pick up  Rank  Draw  Set  Joker  Jack 
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Building Adders & Sub tractors Dr Ahmed Telba. Introducing adder circuits Adder circuits are essential inside microprocessors as part of the ALU, or arithmetic.
CS 105 Digital Logic Design
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Binary Numbers.
Binary Addition CSC 103 September 17, 2007.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
ADDERS Half Adders Recall that the basic rules of binary addition are as indicated below in Table 2-9. A circuit known as the half-adder carries out these.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
1. Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 2.
Gates & Logic Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens Logic Design Goal:to become literate in most common concepts.
LECTURE 4 Logic Design. LOGIC DESIGN We already know that the language of the machine is binary – that is, sequences of 1’s and 0’s. But why is this?
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
WORKING PRINCIPLE OF DIGITAL LOGIC
Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 1.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Logic Gates Learning Objectives Learn that there is a one-to-one relationship between logic gates and Boolean expressions Learn how logic gates are combined.
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Combinational Circuits
ECE 3130 Digital Electronics and Design
Prof. Sin-Min Lee Department of Computer Science
ECE 3130 Digital Electronics and Design
Lecture 11: Hardware for Arithmetic
Computer Architecture CST 250
Dr. Clincy Professor of CS
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
XOR, XNOR, and Binary Adders
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
XOR, XNOR, & Binary Adders
Week 7: Gates and Circuits: PART II
CS Chapter 3 (3A and ) Part 3 of 8
Digital Logic.
Lecture 11: Hardware for Arithmetic
Logic Gates.
CS Chapter 3 (3A and ) – Part 2 of 5
Digital Logic.
COMS 361 Computer Organization
DIGITAL ELECTRONICS B.SC FY
Chapter 10.3 and 10.4: Combinatorial Circuits
Dr. Clincy Professor of CS
Logic Circuits I Lecture 3.
XOR, XNOR, and Binary Adders
Combinational Circuits
XOR Function Logic Symbol  Description  Truth Table 
Digital Circuits.
XOR, XNOR, and Binary Adders
Presentation transcript:

Logic Networks …and the card game Boolette MAT 385 Mullins - Reinecke

Overview Logic networks, or digital circuits, are physical elements used in computers to perform arithmetic operations or make logical choices. These networks are made up of primitive elements called logic gates, with binary inputs and outputs. We can think of these circuits as series of electronic components that perform Boolean operations in order to solve problems.

Logic Gates Logic gates are the building blocks that make up digital circuits. A gate receives one or more inputs (binary 1s and 0s), performs a Boolean operation on them, and outputs the result as a 1 or 0. The logic gates shown to the left represent their Boolean algebra counterparts: * for AND, + for OR, ‘ for NOT. The NAND and NOR gates are simply the negation (‘) of AND and OR expressions. The NOT gate, also called an inverter, represents the negation of a single input. XOR outputs a 1 only when inputs differ.

Another Perspective… via chucklecloud.com

Creating Logic Networks from Truth Functions and Boolean Expressions A single truth function or Boolean expression can be used to draw the corresponding logic network. The next slide shows how to derive a Boolean expression from a truth function, and in turn, how to draw a simple logic network using the Boolean expression. The method that will be used is known as the canonical sum of products (SOP), in which we combine scenarios that will cause our logic network to output a 1.

Truth Function Our inputs are x1 and x2, and F represents the function of the two inputs. We focus on where the output of the function is a 1, so there are three products to sum. x1 x2 F 1 As a Boolean algebraic expression, the SOP would look like this: x1x2 + x1x2’ + x1’x2’ This expression can be used to create the following logic network:

Practical Implementations Half Adder – adds two single bits and outputs the sum and the carry digit. Full Adder – adds two bits and a carry-in bit and outputs a sum bit and carry-out bit. Shifter

Half Adder The half adder adds two binary digits and outputs the sum and carry digit. Using this picture, if A = 1 and B = 1, then the output will be S=0, C=1. S: 1 XOR 1 = 0 C: 1 AND 1 = 1 Note: The sum only shows the last bit. The real answer to this would be S=10, C=1 but we can only store one digit for S.

Full Adder The full adder will compute the sum of binary digits and will take a carry-in digit from another computation. The output will be the sum and the carry-out. If A=1, B=0, and the carry-in digit=1, then the output would be S=0, carry-out digit=1. S: 1 XOR 0 = 1, 1 XOR 1 = 0 Cout: 1 XOR 0 = 1, 1 AND 1 = 1, 1 AND 0 = 0, 1 OR 0 = 1

Shifter A shifter moves digits to the right or left, storing a 0 in the place of the leading bit and moving the last bit off. Ex: Right shift of 1001 will be 0100. An arithmetic shifter will move the digits left or right, but will replace the leading bit with whatever digit it was before the shift. Ex: Arithmetic right shift of 1011 will be 1101. The 4-bit right shifter takes a selector bit and 4 input bits, producing an output of 4 bits.

Boolette (a not-so-practical implementation) Boolette is an open-source strategic card game created by James Fennell and Niamh Tobin in 2010. Two players face each other, using Boolean logic and logic gates to “resolve an initial six digit binary number to a single specific bit.” Boolette implements the logic gates of AND, OR, XOR, and the inverter NOR.

Setup The game begins with six initial “bit cards”, which are simply cards with a 1 and a 0 on them. These cards are to be shuffled/rotated and laid out in a row (above). This can be considered the game’s backbone, as other cards will first be played off of the six bit cards. Players will face opposing sides of the row. In this case, one player would face “001010” and the other would face “101011”. The goal is to lay out cards turn by turn, creating a full pyramid with the final card’s bit matching the rightmost bit of the six bit cards. (the bolded bits above indicate each player’s target bit)

The Deck The deck consists of 4 cards of each of the following: AND 0, AND 1, OR 0, OR 1, XOR 0, XOR 1, NOT giving a total of 28 cards. The six bit cards used at the start of the game.

Taking Turns One player starts as the dealer, randomly dealing 4 cards to each player. The dealer gets the first turn. On each turn, a player must pick up a card from the remaining deck. Then, the player must play a valid card from his or her hand (now 5 cards). If the player does not have a valid card, they must discard to a secondary pile. Once a card is either played or discarded, the other player’s turn begins. Note: Once the remainder of the deck is depleted, the secondary discard pile is shuffled and becomes the pick-up deck.

The Cards

How to Play a Card Each card features an illustrated logic gate, its corresponding Boolean operation in text, and a bit value (either 1 or 0). The way the game is played is to lay down a card under two inputs, where the input values are fed into the gate drawn on the card. Further, in order to be a valid move, the bit on the card must represent the correct output of the two inputs. For example, if the two inputs are {1,0}, and the card being played is XOR 1, then that card is valid (the Boolean operation 1 XOR 0 equates to 1). Only valid cards can be played.

If you play your cards right… Once a card is played, it will then serve as 1 of 2 input values for another card in the next layer in the pyramid. The pyramid will consist of the six initial bits, then a layer of 5 cards, a layer of 4 cards, and so on until one card remains that matches the original target bit. Once either player completes a pyramid of valid cards in this fashion, the game is over.

NOT Card At this point, Boolette seems like a straightforward game. However, its creators wanted to make things more interesting by the addition of the NOT card. If a player chooses to play a NOT card, they do so by applying it to one of six original bit cards. This causes the bits to be flipped (0 becomes 1, 1 becomes 0). As a result, many of the valid cards that have been played up to that point could be rendered invalid. Invalid cards then must be removed from game and placed in the discard pile. Ideally, a player would want to play a NOT card to avoid defeat when their opponent is close to victory. However, keep in mind that flipping bits will likely affect both players’ cards. Still, the goal is to remove more of your opponent’s cards than your own. To counteract the effects of a NOT card, the other player can play their own NOT card if they happen to have one in their hand.

Cascading Effects of a NOT Card The NOT card has wiped out cards from both players’ pyramids. While both players must begin to rebuild, player 2 now has more valid cards than player 1. Notice in the first image that player 1 was only one card away from victory when player 2 played a NOT card.

Boolette is completely open-source and is currently not being sold or actively distributed. However, its developers have offered free downloads of all source materials. These downloads and more information can be found at http://boolette.alamzy.com/