Learning tool for converting Boolean expression and Logic circuit diagram

Similar documents
BOOLEAN ALGEBRA & LOGIC GATES

CHAPTER 3 Boolean Algebra and Digital Logic

Simplifying Logic Circuits with Karnaugh Maps

CSE140: Midterm 1 Solution and Rubric

3.Basic Gate Combinations

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Introduction. Research Problem. Larojan Chandrasegaran (1), Janaki Samuel Thevaruban (2)

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

Gates, Circuits, and Boolean Algebra

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Karnaugh Maps (K-map) Alternate representation of a truth table

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Two-level logic using NAND gates

Lab 1: Full Adder 0.0

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, The Binary Adder

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012

2 SYSTEM DESCRIPTION TECHNIQUES

Efficient Data Structures for Decision Diagrams

Counters and Decoders

Gates & Boolean Algebra. Boolean Operators. Combinational Logic. Introduction

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

You can probably work with decimal. binary numbers needed by the. Working with binary numbers is time- consuming & error-prone.

DESIGN OF GATE NETWORKS

CSE140: Components and Design Techniques for Digital Systems

Introduction. The Quine-McCluskey Method Handout 5 January 21, CSEE E6861y Prof. Steven Nowick

Lecture 5: Gate Logic Logic Optimization

Design and Development of Virtual Instrument (VI) Modules for an Introductory Digital Logic Course

Formulas, Functions and Charts

Combinational circuits

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Digital Electronics Detailed Outline

The GMAT Guru. Prime Factorization: Theory and Practice

COMPUTER SCIENCE. Paper 1 (THEORY)

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

What's New in ADP Reporting?

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

2.0 Chapter Overview. 2.1 Boolean Algebra

Logic in Computer Science: Logic Gates

COURSE SYLLABUS. PRE-REQUISITES: Take CETT-1303(41052); Minimum grade C, CR.

Basic Logic Gates Richard E. Haskell

LabVIEW Day 6: Saving Files and Making Sub vis

Fractions. If the top and bottom numbers of a fraction are the same then you have a whole one.

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Figure 8-1 Four Possible Results of Adding Two Bits

Series and Parallel Resistive Circuits

Using Bluetooth-Enabled PosiTector 6000 with Statistical Process Control Software

Understanding Logic Design

OA3-10 Patterns in Addition Tables

(Refer Slide Time: 2:03)

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan

IMPLEMENTATION OF A TIME TABLE GENERATOR USING VISUAL BASIC.NET

EE360: Digital Design I Course Syllabus

Mixed Logic A B A B. 1. Ignore all bubbles on logic gates and inverters. This means

Natural Language Web Interface for Database (NLWIDB)

Integrating the Internet into Your Measurement System. DataSocket Technical Overview

Excel 2013 What s New. Introduction. Modified Backstage View. Viewing the Backstage. Process Summary Introduction. Modified Backstage View

Philadelphia University Faculty of Information Technology Department of Computer Science Semester, 2007/2008.

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

Exercise 10: Basic LabVIEW Programming

Subject knowledge requirements for entry into computer science teacher training. Expert group s recommendations

What is Microsoft Excel?

SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands

Describe the process of parallelization as it relates to problem solving.

COMPUTER BASED REMOTE CONTROL FOR LAYOUT OF SCALED MODEL TRAINS

Welcome to Ipswitch Instant Messaging

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Kids College Computer Game Programming Exploring Small Basic and Procedural Programming

Designing a Graphical User Interface

Lesson 7 Pentaho MapReduce

Remote control circuitry via mobile phones and SMS

MEP Y9 Practice Book A

Digital Logic Elements, Clock, and Memory Elements

Boolean Algebra. Boolean Algebra. Boolean Algebra. Boolean Algebra

CAs and Turing Machines. The Basis for Universal Computation

Accurate Measurement of the Mains Electricity Frequency

Upon completion of unit 1.1, students will be able to

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1

Binary Adders: Half Adders and Full Adders

imc FAMOS 6.3 visualization signal analysis data processing test reporting Comprehensive data analysis and documentation imc productive testing

Setting Up Outlook on Workstation to Capture s

Welcome to this presentation on Switch Mode Drivers, part of OSRAM Opto Semiconductors LED Fundamentals series. In this presentation we will look at:

Microcontroller Code Example Explanation and Words of Wisdom For Senior Design

Read-only memory Implementing logic with ROM Programmable logic devices Implementing logic with PLDs Static hazards

Chapter 2 Logic Gates and Introduction to Computer Architecture

Logic gates. Chapter. 9.1 Logic gates. MIL symbols. Learning Summary. In this chapter you will learn about: Logic gates

Design of Remote Laboratory dedicated to E2LP board for e-learning courses.

Digital Controller for Pedestrian Crossing and Traffic Lights

Chapter 7 Memory and Programmable Logic

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

PGR Computing Programming Skills

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

8 Simple Tips for Management in Microsoft Outlook


Compiling Recursion to Reconfigurable Hardware using CLaSH

Drupal Survey. Software Requirements Specification /10/2009. Chris Pryor Principal Project Manager

Positional Numbering System

Transcription:

S.Khedika (1), R.Rathnathevi (2), S.Sagirtha (3), T.Mathialakan (4) and S.Kanaganathan (1) Learning tool for converting Boolean expression and Logic circuit diagram (1), (2), (3),(4) Department of Physical Science, Faculty of Applied Science, Vavuniya Campus of the University of Jaffna, Vauniya, Sri Lanka. ( e mail: kthysubra@yahoo.com) Abstract: An endeavor has made to develop an application software tool called Logic Circuit Diagram Designer. Logic Circuit Diagram Designer is a learning tool for Logical Circuit Designing and simplifying Boolean expression. This paper explains algorithm and methodology for transforming Boolean Expression into Logic Circuit diagram and transforming Logic circuit diagram into Boolean Expression. The Karnaugh-map technique is used to simplify the Boolean Expression. The versatile software Logic Circuit Diagram Designer has developed using C# language in Microsoft Visual Studio.Net 2008. Keywords: Logical circuit, Boolean expression, Karnaugh-map Logic Circuits An electronic circuit that is designed for two-state operation is called digital circuits. Logic circuits are part of the digital circuits which is constructed by logic gates. Logic gate is a combination of different electronic components, which takes one or more logic level inputs and produces a single logic level output. The actual logic gates circuits are made with diodes and Transistors. In logic gates, the output can have only one of the two possible states, i.e., either a high level 1 or low level 0. Digital circuits are made up with three basic logic gates: NOT gate, AND gate and OR gate. Introduction Electronic Digital Design is playing a major role in today s world in every routine. Digital design is the design of hardware for computers. Problem Specification and Background Transformation between Logic circuits and Boolean expression is an essential for the secondary educational students. Since the Logic circuit is a diagram it is needed to transform it into Boolean Expression, simplify it and transform it back to the Logic circuit diagram is a good practice for secondary educational students. This learning tool is developed to facilitate user friendly interface to draw Logic circuit diagram and to simplify the Boolean expression using the Karnaugh map technique. Boolean Expression The function of the individual gates or combinations of gates may be expressed in a logical statement known as Boolean Expression. Boolean Expression is simplified by using many techniques some of them are: Boolean algebra, Logical Adjacency, Karnaugh map, Quine-McClusky algorithm. There are two methods for obtaining the Boolean expression that perform the logic specific in the Truth table. [31]

Proceedings of the Third International Symposium, SEUSL: 6-7 July 2013, Oluvil, Sri Lanka 1. Sum of Product Method E.g.:X = (A.B.C)+(A.B.C)+(A.B.C). 2. Product of Sum Method E.g.:X = (A+B+C).(A+B+C).(A+B+C). Karnaugh map Karnaugh map provides a pictorial method of grouping together expressions with common factors and therefore eliminating unwanted variables. The Karnaugh map provides a simple and straight-forward method of minimizing Boolean expressions. The Karnaugh map uses the following rules for the simplification of expressions by grouping together adjacent cells containing ones. 1. No zeros allowed. 2. No diagonals. 3. Only power of 2 numbers of cells in each group. 4. Groups should be as large as possible. 5. Everyone must be in at least one group. 6. Overlapping allowed. 7. Wrap around allowed. 8. Fewest numbers of groups are possible. Methodology Represent the Boolean expression in the Karnaughmap An algorithm was developed to represent the input Boolean expression in the Karnaugh-map. The flow of the algorithm is shown below. The input string is decomposed into sub strings by splitting using +. Then each sub string is recognized by each character to identify the respective location for representing in the Karnaugh-map. Input the Boolean expression Identify the number of variables Split the Boolean expression by using + Recognize each sub Boolean expression by each character to identify respective location of each sub expression Karnaugh-map Simplify the Boolean expression Karnaugh map technique was used to simplify the Boolean expression. This technique is applied using a simplification algorithm proposed by Terry A. Scott on his paper. The following is the part of text of the paper submitted by Terry A. Scott. There are two possible approaches to solve a Boolean expression. The approach that is usually used by humans is to find the largest number of cells that can be joined and move down to smaller groupings. After some consideration it was concluded that for the computer algorithm, starting with the smallest groupings (pairs) and moving up toward larger groupings would be easier. Once an algorithm is established for pairing minterms then higher order terms can be obtained by joining terms of the previous level grouping. Here these are the basics steps for the algorithm. One: Where possible, pair up all minterms or cells that contain ones. You must obtain all legal pairs even though this may lead to extra terms. All pairs are required because it is not possible to tell at this stage which pairs may join together to make groups of four. Two: Remove those single cells that are incorporated into the pairings. Without this, some terms would unnecessarily be included as minterms and also in pair terms. [32]

Three: Group four pairs to obtain groups of four. Again you must obtain all groups of four for the same reasons as given above. Four: Once all groups of four have been obtained, drop out of the pair list those that have been included in the groups of four. No need to include something in the pairs list that has already been handled in the groups of four. Five: Continue to try to group together previous groupings essentially repeating steps three and four above until you reach 2 raised to the power of the number of variables. Six: Output results by displaying the terms for the minterms that weren't joined into higher order groupings, groupings of two cells, groupings of four cells,... until all the terms are displayed. S.Khedika, R.Rathnathevi, S.Sagirtha, T.Mathialakan and S.Kanaganathan Learning tool for converting Boolean expression and Logic circuit diagram Boolean expression into circuit An algorithm was developed to transform the Boolean expression into Logic circuit. The flow of the algorithm is shown below. Boolean Expression (Sum of Product) Determine/Find the number of AND gates by counting the +. (Determine the number of inputs for each AND gates and draw the AND gate) Determine the number of inputs for each AND gates by identifying number of variables in each sub strings and draw the AND gate. Karnaugh-map (representation of the input Boolean expression) Determine the number of inputs for OR gate by counting the + and draw the OR gate. Find and loop a possible pairs with 1s Connect the AND gate with OR gate by identifying the location of each AND gate Find and loop possible quads with 1s Find and loop possible octets with 1s Logic circuit Find and loop possible distinct 1s Simplified Boolean expression Stop Fig. 5: Simplify the Boolean expression The Karnaugh-map is represented in a 1- diamensional array by retrieving the locations of 0s and 1s. Then number of 1s in the 1-diamensional array is counted to loop distinct 1s.Then all possible pairs of adjacent 1s are found and stored in a 2-dimensional array. Then possible quads are found using the pairs. Then octets are found using the quads. Then pairs are extracted which have not been looped for quads or octets. Finally, the simplified Boolean expression is formed using the looped 1s. Logic circuit to Boolean expression A user-friendly UI is designed with tools for drawing circuit diagram. The end-user could draw a logic circuit diagram by drag and drop the gate tools and connectors from the tool box. Each gate tool and connectors generate indexes when they drop into the drawing space. A program was coded to generate index and gather the coordinates of those tools. This information is stored in a data structure called HaspMap. HaspMap is a data structure, where the data are stored as key-value pair. An algorithm was developed to generate Boolean expression using the data stored in the HashMap. [33]

Proceedings of the Third International Symposium, SEUSL: 6-7 July 2013, Oluvil, Sri Lanka Results & Discussion The Fig. 8 represents the user interface to input the Boolean expression for transforming to Logic circuit diagram. The Boolean expression should be a Sum of Product and should have maximum of four variables. Logic circuit diagram, Number of inputs Generate index for each gates and connectors Gather the coordinates of each gates and connectors Store the index and coordinates into the data structure called HashMap as key-value pair Generate the Boolean expression according to the data stored in the HashMap The Fig. 10 represents the user interface to input the Boolean expression for the simplification. The Boolean expression should be a Sum of Product and should have maximum of four variables. The simplified Boolean expression is displayed when click the button Simplify. Boolean expression End Fig. 7: Transform Logic circuit diagram into Boolean expression Fig.10:ScreenshotoftheuserinterfaceforinputBoolean expressionforthesimplification Fig.11:Screenshotshowingthesimplifiedexpression The Fig. 9 represents the logic circuit diagram for the above Boolean expression when click the Draw Circuit button. [34]

S.Khedika, R.Rathnathevi, S.Sagirtha, T.Mathialakan and S.Kanaganathan Learning tool for converting Boolean expression and Logic circuit diagram Future Plans: 1. Display the output signal to an input (Boolean expression/logic circuit diagram) through port. 2. Design an interface to input the Boolean expression through the K-map as well as through the Truth table rather than Boolean function. The results show that the Logic Circuit Diagram Designer transformed the Boolean expression into Logic circuit diagram and simplified the complex Boolean expression (Sum of Product). Conclusion Logic Circuit Diagram Designer to transform the logic circuit diagram into Boolean expression and vice versa. Logic Circuit Diagram Designer consists of 3 main parts. They are: References Belton, D., 1998. Karnaugh Maps. [Online] Available at:http://www.ee.surrey.ac.uk/projects/labview/ minimisation/karnaugh.html [Accessed 02 September 2011]. Chappell, D., n.d. In Understanding.NET-A tutorial & analysis. J.Oberg-Delhi, R., 2002. In Introduction to C# using.net. Pearson Education. Rajendra, D.J.C.N., 2007/2008. In BASIC ELECTRONICS AND DIGITAL LOGIC DESIGN. 1. Transform the logic circuit diagram into Boolean expression. 2. Transform the Boolean expression into logic circuit diagram. 3. Simplify the Boolean expression. The limits for Logic Circuit Diagram Designer: Boolean expression must be Sum of Product The maximum number of variables is four. [35]