Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Boolean Logic Operations – Logic to start building digital circuits – DE Part 3

By Hai Prasaath K

In the previous tutorial, boolean arithmetic was introduced. It was shown that how binary numbers can be added, subtracted, multiplied and divided. In this tutorial, now logic operations on binary numbers will be discussed. The logic operations are not only the way to implement arithmetic operations (by means of combinational circuits), they form the building blocks of the digital circuits. A digital circuit is built by logic gates where the logic gates perform one or the other boolean logic operation.

The digital information is stored in a computing system in binary cells. A binary cell is a device that can have either a HIGH logic or LOW logic state and so can store one bit of information. In a positive logic system, voltage between 2 V to 5V as input signal level (at a TTL Gate) and 2.7 V to 5 V as output signal level (from a TTL Gate) is considered as HIGH logic and any voltage between 0 V to 0.8 V  as input signal level (at a TTL Gate) and 0V to 0.5 V as output signal level (from a TTL Gate) is considered as LOW logic. In a negative logic system, it is vice-versa. The voltage levels between HIGH and LOW logic levels are called transition levels and the digital circuits (logic gates) are not responsive to them.

A group of binary cells is called register. The registers are used to store digital information on a computing system (processor or microcontroller). There can be 8-bit (8 binary cells in single register), 16-bit (16 binary cells in single register), 32-bit (32 binary cells in single register) or 64-bit (64 binary cells in a single register) registers in a 8-bit, 16-bit, 32-bit or 64-bit computing system respectively. The digital circuits fetch binary information stored in registers and operate on it according to their digital circuitry built by logic gates, then again store the result back in other registers.

The binary number stored in a binary cell or register can be treated as binary or boolean variable. The operations on these boolean variables (formed by digits 0 and 1) follow a set of mathematical rules which is referred as boolean algebra. The operations on a set of boolean variables by a digital circuitry can be expressed mathematically as a boolean function. So, a boolean function is formed by binary constants, binary variables and logic operators. The basic logic operations in boolean algebra are AND, OR and NOT operations. The AND, OR and NOT operations are performed by AND, OR and NOT logic gates respectively in a digital circuitry.

Representational Image of Boolean Logic Operations

Fig. 1: Representational Image of Boolean Logic Operations 

AND Operation –

The logical AND operation is equivalent to multiplication of bits. If two bits are multiplied then if both bits are 1 then only the result is 1, otherwise if either bit is 0 or both bits are 0, the result is 0. In boolean algebra, the AND operation is represented by dot or absence of operator. Suppose, there are two boolean variables A and B, then logical AND between A and B is represented by A.B or AB. If the result of this AND operation is stored in a variable Y, then it will be written as A.B = Y or AB = Y. This will be read as ‘A AND B is equal to Y’. All the possible results of AND operation between two single-bit variables A and B are shown in the following truth table –

Truth Table of AND Operation

  Fig. 2: Truth Table of AND Operation

OR Operation –

The logical OR operation is equivalent to addition of bits. If two bits are added then if both bits are 0 then only the result is 0, otherwise if either bit is 1 or both bits are 1, the result is 1. In boolean algebra, the OR operation is represented by plus operator. Suppose, there are two boolean variables A and B, then logical OR between A and B is represented by A + B. If the result of this OR operation is stored in a variable Y, then it will be written as A + B = Y. This will be read as ‘A OR B is equal to Y’. All the possible results of OR operation between two single-bit variables A and B are shown in the following truth table –

Truth Table of OR Operation

Fig. 3: Truth Table of OR Operation

NOT Operation – 

The NOT operation applies to a single operand. It is equivalent to 1’s compliment of a binary variable. If a single bit boolean variable has logic state 0, its NOT operation will result in 1 and vice-versa. It is represented by prime or an overbar. Suppose, if a boolean variable A is taken operand, the NOT operation on it will be represented by A’ or Ā. If it is stored in a variable Y, it will be written as A’ = Y or  Ā = Y. It will be read as ‘not A is equal to Y’. Since the not operator inverts the bits in the operand variable, it is also called logical inverter. All the possible results of NOT operation on a single-bit variable A are shown in the following truth table –   NOT Operation –

Truth Table of NOT Operation

  Fig. 4: Truth Table of NOT Operation

 Boolean Algebra –

The logical operations on boolean variables follow a set of rules which is referred as boolean algebra. By the rules of boolean algebra, the boolean variables combined with logic operators (AND, OR and NOT) can be expressed as boolean functions. The AND, OR and NOT are the basic operators in boolean algebra. Every boolean algebraic expression (a boolean function) is always expressed in the form of AND, OR and NOT operations on boolean variables. There can be one, two, three or any number of boolean variables in a boolean function or boolean algebraic expression. Boolean Algebra –

Practically, each boolean variable represents a bit or serial combination of bits in a computing system. By implementing, a series of logic operations on a set of boolean variables (each variable fetched from a binary cell or register) over a data path, digital circuitry perform computation (binary arithmetic and so binary algebra) on the input data (represented by boolean variables).

Boolean Addition –

The Boolean addition on individual bits is performed by OR operation. It is governed by the following rules –

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 1

It can be seen that boolean addition on two bits is same as logical OR operation on them.

Boolean Multiplication –  

The Boolean multiplication on individual bits is performed by AND operation. It is governed by the following rules –

0 · 0 = 0

0 · 1 = 0

1 · 0 = 0

1 · 1 = 1

It can be seen that boolean multiplication on two bits is same as logical AND operation on them.

Boolean Compliment –

The compliment of a boolean variable is performed by NOT operation. It is governed by the following rules –

0′ = 1

1′ = 0.

It can be seen that boolean compliment (1’s compliment) on a bit is same as logical NOT operation on it.

Now, it must be clear that by implementing logic operations (OR, AND, NOT), arithmetic operations on binary numbers (and so digital data) can be performed. In the next tutorial, learn about various logic gates. The logic gates perform the basic logic operations (AND, OR, NOT) and other logic operations (derived from AND, OR and NOT). The logic gates are the building blocks of a digital circuit. Any boolean algebraic expression or boolean function can be expressed and minimized to basic logic operations between boolean variables (data fetched over data paths) which then can be practically fabricated on a digital circuit as interconnection between logic gates.

 


Filed Under: Featured Contributions, Tutorials

 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)
  • An Embedded Developer’s Perspective on IOT (Internet of Things)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Need help to choose accelerometer
  • Pic 16f877A Hex file
  • 7 segment display connections
  • finding attenuation coefficient in CST
  • Effect of variable gain amplifier and LNA on the input RF signal's phase

RSS Electro-Tech-Online.com Discussions

  • How to designing a battery charging indicator circuit for 18650 battery pack
  • NOR gate oscillator in LTspice not working
  • ICM7555 IC duty cycle limit at high frequency?
  • I've DESTROYED 3 piezo buttons :((((
  • led doorbell switch
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering