Research ProposalPDF Available

Ternary Logic Gates: Advancing Computing with -1, 0, 1 Base

Authors:

Abstract and Figures

Background: The traditional binary logic gates operate on a binary system with inputs and outputs taking values of 0 and 1. In this paper, we explore the concept of logic gates using a ternary base, where inputs and outputs can take values of -1, 0, and 1. Objectives: Our study aims to demonstrate the implementation and functionality of basic logic gates such as OR gate, AND gate, NAND gate, NOT gate, buffer gate, NOR gate, XOR gate, and XNOR gate using a ternary base. We also extend our exploration to include 2-input and 3-input logic gates. Methods: We utilize mathematical modeling and logical analysis to design and analyze the behavior of ternary logic gates. Results: Through theoretical derivations and practical simulations, we showcase the operation and effectiveness of ternary logic gates, highlighting their advantages and potential applications. Conclusions: Ternary logic gates offer an alternative approach to traditional binary logic gates, providing flexibility in representing and processing information. Our research expands the understanding and utilization of ternary logic in digital systems.
Content may be subject to copyright.
Ternary Logic Gates: Advancing Computing with -1, 0, 1 Base
Pearl Bipin PulickalYash Jesus DinizDr. Trilochan Panigrahi
June 11, 2024
Abstract
Background: The traditional binary logic gates operate on a binary system with inputs and
outputs taking values of 0 and 1. In this paper, we explore the concept of logic gates using a ternary
base, where inputs and outputs can take values of -1, 0, and 1.
Objectives: Our study aims to demonstrate the implementation and functionality of basic logic
gates such as OR gate, AND gate, NAND gate, NOT gate, buffer gate, NOR gate, XOR gate, and
XNOR gate using a ternary base. We also extend our exploration to include 2-input and 3-input
logic gates.
Methods: We utilize mathematical modeling and logical analysis to design and analyze the behavior
of ternary logic gates.
Results: Through theoretical derivations and practical simulations, we showcase the operation and
effectiveness of ternary logic gates, highlighting their advantages and potential applications.
Conclusions: Ternary logic gates offer an alternative approach to traditional binary logic gates,
providing flexibility in representing and processing information. Our research expands the under-
standing and utilization of ternary logic in digital systems.
Keywords: Logic gates, Ternary base, Digital systems, OR gate, NOT gate, Buffer gate, NOR gate,
AND gate, XOR gate, XNOR gate, 2-input, 3-input
Subject Descriptors: B.7.1 [Integrated Circuits]: Types and Design Styles—Logic
Categories: B.7.1 [Integrated Circuits]: Types and Design Styles—Logic Gates, B.7.2 [Integrated Cir-
cuits]: Digital Integrated Circuits—Design Aids
Corresponding Author: Pearl Bipin Pulickal, Email: pearlbipin@gmail.com
1 Introduction
In the vast expanse of our technologically driven civilization, digital systems reign supreme as the un-
yielding pillars upon which our modern way of life is built. These intricate networks of interconnected
devices, ranging from the ubiquitous smartphones we carry in our pockets to the sprawling communica-
tion infrastructures that span continents, owe their existence to the intricate dance of electrons within
the confines of logic gates.
Logic gates, those humble yet indispensable building blocks of digital logic circuits, are the unsung
heroes behind the scenes, tirelessly performing the fundamental operations that underpin all digital
computation. Through their binary nature, wherein they manipulate inputs and outputs represented as
either a 0 or a 1, logic gates serve as the gatekeepers of information flow, guiding the intricate dance of
data through the labyrinthine pathways of modern technology.
Yet, as our collective thirst for innovation knows no bounds, the demands placed upon these stalwart
guardians of the digital realm grow ever more complex. The binary framework, while elegant in its
simplicity, begins to strain under the weight of the burgeoning intricacies of modern computing. The
relentless march of technological progress calls for a paradigm shift, a departure from the confines of
binary representation toward more nuanced and flexible approaches to information processing.
Bachelor of Technology of Electronics and Communication Engineering, National Institute of Technology Goa, Cun-
colim, Goa, India. Primary contributor to this research. Email: pearlbipin@gmail.com
Bachelor of Engineering of Computer Science Engineering, Don Bosco College of Engineering, Fatorda, Goa, India
(affiliated to Goa University). Contributed details on memristors, simulations, ternary base operations, and logic gates.
Email: yashdiniz@gmail.com
Associate Professor of Electronics and Communication Engineering, National Institute of Technology Goa, Cuncolim,
Goa, India. Contributed by proofreading and correcting errors, as well as verifying logic in electronics. Email: tpani-
grahi@nitgoa.ac.in
1
Thus, amidst the swirling currents of change, the need arises for alternative methodologies capable of
navigating the increasingly intricate landscape of digital computation. The limitations of binary logic,
once the bedrock upon which digital systems were built, now serve as the impetus for innovation. As
the boundaries of what is possible expand ever outward, so too must our methods evolve to meet the
challenges of tomorrow. In this ever-shifting landscape, the quest for new paradigms and novel solutions
becomes not merely a pursuit of innovation but a necessity for survival in the digital age.
1.1 Expanding Horizons with Ternary Logic
Ternary logic gates mark a significant departure from traditional binary gates by incorporating a third
state, typically symbolized as -1, alongside the familiar 0 and 1. This introduction of an additional state
not only expands the range of possible states but also paves the way for groundbreaking innovation and
optimization in digital system design. By embracing ternary logic, designers transcend the limitations
of binary systems, unlocking a vast array of new possibilities and avenues for exploration.
The inclusion of a third state opens up a wealth of opportunities for enhancing the functionality and
efficiency of digital circuits. With ternary logic, designers can create circuits that operate with greater
versatility and sophistication, capable of handling complex decision-making processes more efficiently.
This richer palette of options empowers designers to tackle challenges that were previously impractical
or unfeasible within the confines of binary logic.
Furthermore, the adoption of ternary logic enables designers to optimize the utilization of resources
within digital systems. By leveraging the additional state, designers can develop circuits that achieve
higher levels of performance while consuming fewer resources, leading to significant improvements in
both power efficiency and overall system scalability.
In essence, embracing ternary logic represents a paradigm shift in digital system design, offering
designers a transformative approach to creating circuits with enhanced functionality and efficiency. By
capitalizing on the expanded range of states provided by ternary logic gates, designers can unlock new
levels of innovation and push the boundaries of what is possible in the realm of digital technology.
1.2 Understanding Balanced Ternary Logic
Imagine you have a magical heater that doesn’t just turn on and off like a regular one, but instead, it
has three settings: super hot, no heat at all, and chilly cold. These settings aren’t just random; they
represent different levels of warmth or coldness, like a scale.
So, when mentioning balanced ternary logic, we deal with this magical heater’s three settings: +1 for
super hot, 0 for no change, and -1 for chilly cold. Each setting tells us something about the heater’s state,
just like in digital systems where ternary logic helps us understand different possibilities or outcomes.
Now, let’s break it down even further:
Super Hot (+1): This setting means the heater is actively blasting out all the warmth it can
muster. It’s like standing next to a cozy fireplace on a cold winter’s night.
No Heat (0): This setting is like the heater taking a break. It’s not warming things up, neither is
it making them colder. It’s just maintaining the current temperature, like when you leave a room
and turn off the heater.
Chilly Cold (-1): This setting is the opposite of super hot. It’s like stepping outside on a frosty
morning without a jacket. Brr!
So, balanced ternary logic is like having these three options to describe the state of our magical
heater. And just like understanding the heater’s settings helps us control the temperature in our room,
ternary logic helps us manage and comprehend the complexities of digital systems by considering three
possible states instead of just two. It adds an extra layer of nuance and flexibility, which can be handy
when dealing with a variety of digital tasks and challenges.
Significance of Each State
In the realm of temperature control, envisioning a tri-state model offers a nuanced representation of
temperature dynamics, integrating the principles of electricity and light into our understanding of heating
systems.
Let’s delve deeper into this concept:
2
-1 State: Coldness and Low State
At the negative end of the spectrum lies the -1 state, symbolizing coldness and the presence
of a negative electrical signal.
In this scenario, the heater is actively cooling the environment. It’s like a heater currently
functioning as a cooler, ready to engage in heating but not yet fully committed to action.
Expanding on this, -1 could represent a scenario where the heater operates in the opposite
direction, taking energy out of the system. The heater in this state is not actively generating
warmth but is cooling. It occupies a low ground, characterized by an active absence of energy.
+1 State: Warmth and High State
In contrast, the +1 state embodies warmth and the presence of a strong electrical signal.
This robust signal signifies full engagement, akin to the heater operating at maximum capacity,
generating heat and warmth to elevate the temperature. It’s like the bright beam of light from
a powerful spotlight, illuminating the space with its intensity and warmth.
0 State: Thermal Equilibrium and Neutral State
Meanwhile, the 0 state represents thermal equilibrium, accompanied by the absence of an
electrical signal.
In this state, the system remains in balance, with no heating or cooling occurring. It’s akin
to a paused moment in the flow of energy, where neither heating nor cooling is necessary or in
progress. The absence of a signal indicates a state of stability, where the temperature remains
constant without any external influence from the heater.
By incorporating the notions of high and low electrical signals, and the analogy of light from a
bulb, into our tri-state model, we gain a deeper understanding of balanced ternary logic. This nuanced
approach allows for finer adjustments and optimizations, empowering us to navigate varying degrees
of warmth, coldness, and equilibrium with greater precision. Just as a skilled conductor modulates
the intensity of a musical piece, this model enables us to fine-tune temperature management, ensuring
optimal comfort and efficiency in diverse environments.
Applications Across Domains
The introduction of ternary logic has far-reaching implications across various domains, from digital
circuitry to emerging technologies like memristors1. Ternary logic gates offer power efficiency, flexibility,
and fault tolerance in digital circuit design. For example, by incorporating ternary logic gates into
circuit designs, engineers can optimize power consumption by leveraging the 0 state to indicate ”off”
states without fully deactivating components.
Memristors and Ternary Logic
Memristors, a class of non-volatile memory devices with resistance that depends on the history of applied
voltage and current, exhibit behavior that aligns naturally with ternary logic. Unlike traditional binary
systems, where memristors operate within a two-state framework, ternary logic allows for more seamless
integration of memristive devices, leveraging the -1 state to represent intermediate resistance levels and
enabling more efficient memory storage and retrieval.
A memristor, short for memory resistor, is a fundamental electronic component that can remember
the amount of charge that flows through it over time. Let’s delve into its workings, step by step.
Given a simple resistor, which impedes the flow of electrical current. In a typical resistor, the
relationship between voltage (V) and current (I) is linear, as per Ohm’s Law (V = IR), where R represents
resistance.
Now, let’s introduce the intriguing concept of a memristor. Unlike a conventional resistor, a memristor
possesses a unique property: its resistance adapts based on the charge traversed previously. Essentially,
a memristor’s resistance isn’t fixed like a traditional resistor; it depends on the history of applied voltage
and current.
1Memristors mostly work on unbalanced ternary logic (0, 1, 2), rather than balanced ternary logic (-1, 0, 1), but are
worthy of a mention since they can be used in balanced ternary applications as well.
3
To grasp this, envision a memristor with low resistance. Applying a small voltage leads to a minute
current flow, slightly increasing its resistance. Amplify the voltage, and a greater current surges, further
elevating the resistance. The crux lies in the cumulative resistance change, contingent upon the overall
charge passing through the memristor.
This remarkable trait enables memristors to ”remember” previous states, rendering them promising
for non-volatile memory applications. Unlike volatile memory such as RAM, which loses data upon power
loss, memristors maintain their resistance levels even when power is off. Thus, they’re apt for memory
devices necessitating both high density and non-volatility.
Now, let’s delve into the microscopic realm of memristors. Typically comprising thin films of transition
metal oxides between two electrodes, memristors undergo fascinating changes when voltage is applied.
Oxygen vacancies within the oxide material migrate, altering its resistance. This migration is pivotal,
engendering resistance alteration and imbuing memristors with the capacity to ”remember” prior states.
Now, onto ternary logic and its integration with memristors. In traditional binary logic, we operate
with bits that can be 0 or 1, signifying two states. Memristors offer an enticing prospect to transcend this
binary paradigm by embracing ternary logic, introducing a third state: -1. In ternary logic, memristors
can manifest three states: low resistance (1), high resistance (0), and an intermediate resistance level
(-1).
How does ternary logic mesh with memristors? In binary systems, memristors operate within a
binary framework, showcasing low (1) or high (0) resistance. But with ternary logic, the -1 state facilitates
the representation of intermediate resistance levels. Instead of just two resistance states, memristors can
exhibit a continuum of resistance states, enabling nuanced information storage and retrieval.
For instance, envision a memristor with resistance ranging from 0 to 100 ohms. In binary, we’d
categorize it as low (1) or high (0) resistance. However, with ternary logic, the -1 state allows the
representation of resistance levels between 0 and 100 ohms. This amplifies information storage within a
single memristor, encoding more than just two distinct resistance levels.
Incorporating ternary logic with memristors holds promise for more efficient memory systems. Lever-
aging the -1 state for intermediate resistance levels enables denser, more versatile memory devices, as
more information can be packed into a smaller space.
In essence, memristors, with their ability to retain charge flow history and exhibit varied resistance
levels, harmonize naturally with ternary logic. By embracing ternary logic and integrating the -1 state,
memristors pave the way for more efficient and adaptable memory systems, facilitating precise, dense
information storage and retrieval.
1.3 Scope of Exploration
In this paper, we embark on a comprehensive exploration of ternary logic gates and their applications in
digital system design. We aim to delve into the theoretical foundations, practical implementations, and
real-world implications of ternary logic, elucidating the behavior and characteristics of fundamental logic
gates within the context of ternary logic. Through a multifaceted approach that combines mathematical
modeling, logical analysis, and practical simulations, we seek to provide a thorough understanding of
ternary logic and its role in shaping the future of digital electronics.
2 Related Work
Ternary logic, with its ability to represent three states (-1, 0, 1), has garnered significant attention in
recent years due to its potential to address various challenges in digital circuit design, such as power
consumption, area utilization, and signal integrity. Here, we review recent literature on ternary logic
gates and circuits, focusing on key advancements and approaches proposed by other researchers.
Seger [1] provides a comprehensive exploration of ternary logic, specifically focusing on the design and
implementation of TNAND and TAND gates. The study offers valuable insights into the fundamental
principles of ternary logic and highlights the advantages of using ternary gates in digital circuitry.
Rani and Lyngton Thangkhiew [2] present an overview of different approaches for ternary reversible
logic circuits synthesis using ternary reversible gates, with special reference to virtual reality applications.
The study discusses various techniques for synthesizing ternary reversible logic circuits and evaluates their
suitability for emerging technologies, such as virtual reality.
In a recent study, researchers demonstrated the design of ternary logic gates and circuits using
graphene nanoribbon field-effect transistors (GNRFETs) [3, 5]. The utilization of GNRFETs enables
4
the realization of efficient ternary logic circuits with improved performance characteristics, paving the
way for the integration of ternary logic into mainstream digital systems.
Memristor-based ternary logic gates have also attracted considerable attention due to their potential
for realizing unbalanced ternary logic operations [4]. By exploiting the unique properties of memris-
tors, researchers have proposed novel approaches for implementing ternary logic gates with enhanced
functionality and reduced power consumption.
Furthermore, balanced ternary logic gates utilizing memristors have been investigated for their po-
tential applications in neuromorphic computing and cognitive systems [6]. These gates offer robustness
and adaptability, making them suitable for performing complex computational tasks in brain-inspired
architectures.
Ternary combinational logic gates designed using tri-valued memristors have been explored for their
potential to streamline logic operations and reduce circuit complexity [7]. This approach underscores
the versatility of memristor technology in advancing ternary logic designs.
A review by Mekki and Al-Zahrani [10] provides a performance analysis of ternary logic gates imple-
mented in quantum-dot cellular automata (QCA). The study highlights the potential of QCA technology
to achieve high-speed, low-power ternary logic circuits, emphasizing the advantages of QCA over tradi-
tional CMOS technology.
Another review [8] examines various design methodologies for ternary logic circuits, offering a com-
prehensive evaluation of different approaches and their respective benefits. This review shares a valuable
resource for researchers looking to explore the landscape of ternary logic design.
Recent advancements in carbon nanotube field-effect transistors (CNTFETs) have also been leveraged
for designing ternary logic gates [9]. The unique properties of CNTFETs facilitate the creation of high-
performance ternary logic circuits, promoting their adoption in next-generation digital systems.
The performance of ternary logic gates in quantum-dot cellular automata (QCA) was analyzed by
Mekki and Al-Zahrani [10], highlighting the potential of QCA technology in achieving high-speed, low-
power ternary logic circuits. This study emphasizes the advantages of QCA over traditional CMOS
technology.
In summary, recent advancements in ternary logic gate design and synthesis techniques have opened
up new possibilities for efficient and versatile digital circuits. By leveraging emerging technologies such
as graphene nanoribbons, memristors, and carbon nanotubes, researchers are pushing the boundaries of
ternary logic, paving the way for innovative solutions in digital system design and beyond.
3 Methodology
3.1 Introduction to Ternary Logic
Ternary logic, also known as three-valued logic (using ternary digits or trits instead of bits), represents a
significant departure from the traditional binary logic system that forms the foundation of contemporary
digital circuits. Unlike binary logic, which operates using two discrete states (0 and 1), ternary logic
introduces a third state, typically represented as -1, alongside 0 and 1. This additional state fundamen-
tally enhances the digital system’s expressive power and efficiency, offering numerous advantages over its
binary counterparts.
The core concept of ternary logic revolves around three distinct states to encode and process infor-
mation. Each bit can represent one of two possible values, leading to a base-2 numeral system in binary
logic. In contrast, ternary logic employs a base-3 numeral system, where each ternary digit (trit) can
take on one of three values: -1, 0, 1. This increase in the number of states per digit translates into a
higher information density, allowing ternary systems to perform more complex computations with fewer
elements.
One of the primary motivations for exploring ternary logic is its potential to improve the efficiency
and performance of digital circuits. With three states instead of two, ternary logic can reduce the number
of logic gates and interconnections in a circuit, leading to more compact and less power-hungry designs.
This reduction in circuit complexity is particularly advantageous in applications where space and power
are at a premium, such as mobile and embedded systems.
Additionally, ternary logic offers enhanced noise margins compared to binary logic. The difference
between the two states (0 and 1) can be relatively small, making a binary system more susceptible to
noise and errors. In ternary logic, the additional state can provide a larger separation between the states,
improving the system’s robustness against noise and variations in signal levels. This inherent robustness
makes ternary logic particularly suitable for applications in harsh or noisy environments.
5
The advantages of ternary logic extend beyond just circuit efficiency and robustness. Ternary logic
can offer simpler and more symmetric implementations in certain computational tasks, such as arith-
metic operations. For example, the negative state (-1) can simplify the design of subtraction and other
arithmetic functions, potentially leading to faster and more efficient computational units. This symme-
try around zero is a unique feature of ternary logic that can be exploited to streamline various digital
operations.
Furthermore, the potential applications of ternary logic are vast and diverse. In digital signal pro-
cessing, the higher information density of ternary systems can enable more efficient encoding and trans-
mission of data. Ternary modulation schemes can offer higher data rates and improved spectral efficiency
in communication. Ternary logic is also gaining traction in neural network designs and other artificial
intelligence applications, where the multi-valued nature of ternary systems can more closely mimic the
complex signaling processes of biological neurons.
The exploration of ternary logic is not without its challenges. Designing and fabricating ternary logic
circuits requires new materials and technologies that can reliably produce and distinguish between the
three states. Researchers are investigating various approaches, such as graphene nanoribbons, carbon
nanotubes, and memristors, to create efficient ternary logic devices. These emerging technologies promise
to overcome the limitations of traditional semiconductor materials and pave the way for the practical
implementation of ternary logic.
Here, we will delve into the intricate process of designing and implementing ternary logic gates.
We will explore approaches and techniques to realize ternary logic circuits, including novel materials
and device architectures. The discussion will encompass the fundamental design principles, synthesis
methods, and performance metrics, that are essential for developing reliable and efficient ternary logic
gates. By examining these aspects in detail, we aim to provide a comprehensive understanding of the
current state of ternary logic research and its potential to revolutionize digital circuit design.
3.2 Basic Ternary Operations
To fully appreciate the design and functionality of ternary logic gates, it is essential to understand the
basic operations that underpin ternary logic systems. In a ternary logic system, the basic arithmetic
operations such as addition, subtraction, and multiplication are extended to accommodate three states:
-1, 0, and 1. These operations form the foundation for more complex logic functions and are crucial for
the synthesis of ternary circuits.
Ternary Addition
Ternary addition involves combining two ternary digits (trits) to produce a sum and a carry. The addition
operation in ternary logic is analogous to binary addition but with three states instead of two. The result
of adding two ternary digits can range from -2 to 2, necessitating a carry mechanism to handle values
that exceed the ternary digit range. Table 1 shows the addition table for ternary digits.
+ -1 0 1
-1 -2 -1 0
0 -1 0 1
1 0 1 2
Carry -1 0 1
-1 -1 0 0
0 0 0 0
1 0 0 1
Table 1: Karnaugh Map for Ternary Addition (with illegal states), and accompanying Karnaugh Map
for Carry
When the sum exceeds the range of -1 to 1, a carry is generated, and the sum is adjusted accordingly.
For instance, adding 1 and 1 results in 2, which is represented as a carry of 1 and a sum of -1 (since 2
in ternary is represented as 1 carry and -1 sum). This carry mechanism is essential for implementing
multi-trit addition in ternary logic circuits.
Ternary Subtraction
Ternary subtraction is the process of determining the difference between two ternary digits. In balanced
ternary logic, subtraction can be performed by negating the subtrahend using a ternary complement.
The complement of a ternary digit is obtained by inverting its value: the complement of 1 is -1, the
6
complement of 0 is 0, and the complement of -1 is 1. Table 2 shows the subtraction table for ternary
digits.
- -1 0 1
-1 0 1 2
0 -1 0 1
1 -2 -1 0
Borrow -1 0 1
-1 0 0 1
0 0 0 0
1 -1 0 0
Table 2: Karnaugh Map for Ternary Subtraction (with illegal states), and accompanying Karnaugh Map
for Borrow
When performing ternary subtraction, if the result falls outside the range of -1 to 1, a borrow is
introduced. For example, subtracting 1 from -1 results in -2, which is represented as a borrow of 1 and
a difference of 1 (since -2 in ternary is represented as 1 borrow and 1 difference).
Ternary Multiplication
Ternary multiplication extends the concept of binary multiplication to three-valued logic. Each trit is
multiplied, and the results are combined, accounting for the possibility of overflow, similar to addition
and subtraction. Table 3 shows the multiplication table for ternary digits.
×-1 0 1
-1 1 0 -1
0 0 0 0
1 -1 0 1
Table 3: Karnaugh Map for Ternary Multiplication
The multiplication operation is straightforward as there is no need for carry or borrow mechanisms.
Each product falls within the range of -1 to 1, simplifying the implementation of ternary multiplication
circuits. However, when performing multi-trit multiplication, the partial products must be summed using
ternary addition rules, which can introduce carries.
Ternary Logic Functions
Beyond basic arithmetic operations, ternary logic includes various logical functions fundamental to digital
circuit design. These functions include ternary AND (TAND), ternary OR (TOR), and ternary NOT
(TNOT), among others. Each function operates on ternary inputs to produce ternary outputs, enabling
complex logical operations in ternary circuits.
For two-input gates, the TNOT function inverts the input trit and is defined as follows:
TNOT(1) = 1,
TNOT(0) = 0,
TNOT(1) = 1.
This function is crucial for creating complementary logic and is analogous to the binary NOT function.
The TAND function, as defined in Table 4. This logical function mirrors the behavior of the binary
TAND -1 0 1
-1 -1 -1 -1
0 -1 0 0
1 -1 0 1
Table 4: Karnaugh Map for Ternary AND (TAND) logic function
AND gate but accommodates three input states. It serves as an input minimizer, returning the lower
input value.
The TOR function, as defined in Table 5. The ternary OR function expands the binary OR function
to handle three-valued inputs. It serves as an input maximizer, returning the higher input value.
7
TOR -1 0 1
-1 -1 0 1
0 0 0 1
1 1 1 1
Table 5: Karnaugh Map for Ternary OR (TOR) logic function
These ternary logic functions form the foundation for more complex ternary digital circuits, allowing
for the design and implementation of ternary computing systems. By leveraging the three-state nature
of ternary logic, these systems can achieve more compact and potentially more efficient representations
of logical operations compared to their binary counterparts.
Implications for Ternary Logic Gate Design
Understanding these basic ternary operations is fundamental for the design and implementation of
ternary logic gates. The arithmetic and logical functions outlined above provide the building blocks
for more complex ternary circuits. Designers can leverage these operations to create efficient and high-
performance ternary logic gates, which can then be combined to form larger and more intricate digital
systems.
In the following sections, we will explore the specific methodologies for designing ternary logic gates,
including the use of emerging technologies such as graphene nanoribbons, carbon nanotubes, and mem-
ristors. These technologies hold the promise of making ternary logic a practical and advantageous
alternative to traditional binary logic in various digital applications.
1-Input Logic Gates
Buffer
A=A
NOT
¬A= NOT A
2-Input Logic Gates
OR
AB= A OR B
AND
AB= A AND B
NAND
AB= A NAND B
NOR
AB= A NOR B
XOR
AB= A XOR B
XNOR
AB= A XNOR B
8
3-Input Logic Gates
OR
ABC= A OR B OR C
AND
ABC= A AND B AND C
NAND
ABC= A NAND B NAND C
NOR
ABC= A NOR B NOR C
XOR
ABC= A XOR B XOR C
XNOR
ABC= A XNOR B XNOR C
3.3 Introduction to Ternary Logic Gates
Ternary logic gates form the backbone of digital circuits designed to operate with three distinct states:
0, 1, and -1. In contrast to binary logic gates, which process data with only two states (0 and 1), ternary
logic gates offer increased flexibility and complexity, making them invaluable components in various
digital systems.
AND Gate for Ternary Logic (0, 1, -1)
Definition: The AND gate in ternary logic functions as a logical operator that produces a high output
(1) only when all of its inputs are high (1). It yields a neutral signal (0) if any of the inputs are neutral
(0), and outputs a low signal (-1) when at least one input is low (-1).
Function: The primary function of the AND gate is to perform logical conjunction, ensuring that
the output signal is high only when all input signals are high.
Truth Table for Two-Input AND Gate:
Input A Input B Output
111
1 0 1
1 1 1
011
0 0 0
0 1 0
111
1 0 0
1 1 1
9
A
BY
Two-Input AND Gate
The truth table demonstrates the behavior of the two-input AND gate in ternary logic, showing all
possible combinations of input states and their corresponding output states. It illustrates that the output
is high only when both inputs are high, remains neutral if at least one input is neutral, and becomes low
if any input is low.
Truth Table for Three-Input AND Gate:
Input A Input B Input C Output
1111
11 0 1
11 1 1
1 0 11
1 0 0 1
1 0 1 1
1 1 11
1 1 0 1
1 1 1 1
0111
01 0 1
01 1 1
0 0 11
0 0 0 0
0 0 1 0
0 1 11
0 1 0 0
0 1 1 0
1111
11 0 1
11 1 1
1 0 11
1 0 0 0
1 0 1 0
1 1 11
1 1 0 0
1 1 1 1
A
B
C
Y
Three-Input AND Gate
The truth table illustrates the behavior of the three-input AND gate in ternary logic, showcasing all
10
possible combinations of input states alongside their corresponding output states. It demonstrates that
the gate produces a high output only when all three inputs are high. If any input is neutral, the output
remains neutral, and if any input is low, the output becomes low.
The three-input AND gate serves as a crucial foundational component in ternary digital circuits,
enabling logical operations necessary for processing ternary data efficiently. Its utilization spans various
domains, including digital signal processing, communication systems, and computational logic, where
precise management of data flow and decision-making is paramount.
OR Gate for Ternary Logic (0, 1, -1)
Definition: The OR gate in ternary logic functions as a logical operator that produces a high output
(1) if either of its inputs is high (1). It yields a low signal (-1) only when all inputs are low (-1), and
outputs a neutral state (0) when any of the inputs are neutral.
Function: The primary function of the OR gate is to perform logical disjunction, ensuring that the
output signal is high if at least one input signal is high.
Truth Table for Two-Input OR Gate:
Input A Input B Output
111
1 0 0
1 1 1
01 0
0 0 0
0 1 1
11 1
1 0 1
1 1 1
A
BY
Two-Input OR Gate
The truth table illustrates the behavior of the two-input OR gate in ternary logic, showcasing all
possible combinations of input states and their corresponding output states. The gate functions in such a
way that the output is high (1) if either of the inputs is high (1). It remains neutral (0) when both inputs
are neutral (0), and produces a low signal (-1) only when both inputs are low (-1). This functionality
ensures that the output signal is elevated if at least one of the input signals is high, providing flexibility
in logical operations and decision-making processes.
11
Truth Table for Three-Input OR Gate:
Input A Input B Input C Output
1111
11 0 0
11 1 1
1 0 1 0
1 0 0 0
1 0 1 1
1 1 1 1
1 1 0 1
1 1 1 1
011 0
01 0 0
01 1 1
0 0 1 0
0 0 0 0
0 0 1 1
0 1 1 1
0 1 0 1
0 1 1 1
111 1
11 0 1
11 1 1
1 0 1 1
1 0 0 1
1 0 1 1
1 1 1 1
1 1 0 1
1 1 1 1
A
B
C
Y
Three-Input OR Gate
The truth table illustrates the behavior of the three-input OR gate in ternary logic, showcasing all
possible combinations of input states alongside their corresponding output states. The gate produces a
high output if at least one input is high. If all inputs are neutral or low, the output will be neutral or
low, respectively.
The three-input OR gate is an essential component in ternary digital circuits, enabling logical oper-
ations necessary for processing ternary data effectively. Its utilization spans various domains, including
digital signal processing, communication systems, and computational logic, where the precise manage-
ment of data flow and decision-making is crucial.
NOT Gate for Ternary Logic (0, 1, -1)
Definition: The NOT gate in ternary logic functions as a logical operator that inverts the input state.
Specifically, it produces: - A high output (1) if the input is low (-1). - A low output (-1) if the input is
high (1). - A neutral output (0) if the input is neutral (0).
Function: The primary function of the NOT gate is to perform logical negation, ensuring that the
output signal is the logical complement of the input signal.
12
Truth Table for NOT Gate: Input Output
1 1
0 0
11
A Y
NOT Gate
The truth table illustrates the behavior of the NOT gate in ternary logic, showcasing all possible
combinations of input states and their corresponding output states. The gate functions by inverting the
input state.
Specifically, it produces: - A high output (1) if the input is low (-1). - A low output (-1) if the input
is high (1). - A neutral output (0) if the input is neutral (0).
This functionality ensures that the output signal is the logical complement of the input signal, allowing
for versatile logical operations and decision-making processes.
NAND Gate for Ternary Logic (0, 1, -1)
Definition: The NAND gate in ternary logic functions as a logical operator that produces a low output
(-1) only when all of its inputs are high (1). It yields a neutral signal (0) if any of the inputs are neutral
(0) without a low, and outputs a high state (1) when any inputs are low (-1).
Function: The primary function of the NAND gate is to perform logical conjunction, ensuring that
the output signal is low only when all input signals are high.
Truth Table for Two-Input NAND Gate:
Input A Input B Output
11 1
1 0 1
1 1 1
01 1
0 0 0
0 1 0
11 1
1 0 0
1 1 1
A
BY
Two-Input NAND Gate
The truth table demonstrates the behavior of the two-input NAND gate in ternary logic, showing
13
all possible combinations of input states and their corresponding output states. It illustrates that the
output is high (1) unless both inputs are high (1), where it becomes low (-1).
Truth Table for Three-Input NAND Gate:
Input A Input B Input C Output
111 1
11 0 1
11 1 1
1 0 1 1
1 0 0 1
1 0 1 1
1 1 1 1
1 1 0 1
1 1 1 1
011 1
01 0 1
01 1 1
0 0 1 1
0 0 0 0
0 0 1 0
0 1 1 1
0 1 0 0
0 1 1 0
111 1
11 0 1
11 1 1
1 0 1 1
1 0 0 0
1 0 1 0
1 1 1 1
1 1 0 0
1 1 1 1
A
B
C
Y
Three-Input NAND Gate
The truth table illustrates the behavior of the three-input NAND gate in ternary logic, showcasing
all possible combinations of input states alongside their corresponding output states. It demonstrates
that the gate produces a low output (-1) only when all three inputs are high (1). If any input is neutral
(0) or low (-1), the output becomes high (1).
The three-input NAND gate serves as a fundamental component in digital circuits, facilitating various
logical operations essential for processing ternary data efficiently. Its application extends across diverse
domains, including digital signal processing, communication systems, and computational logic, where
precise management of data flow and decision-making is imperative.
NOR Gate for Ternary Logic (0, 1, -1)
Definition: The NOR gate in ternary logic functions as a logical operator that produces a high output
(1) only when all of its inputs are low (-1). It yields a low signal (-1) if any of the inputs are high (1),
14
and outputs a neutral state (0) when at least one input is neutral.
Function: The primary function of the NOR gate is to perform logical disjunction, ensuring that
the output signal is high only when all input signals are low.
Truth Table for Two-Input NOR Gate:
Input A Input B Output
11 1
1 0 0
1 1 1
01 0
0 0 0
0 1 1
111
1 0 1
1 1 1
A
BY
Two-Input NOR Gate
The truth table demonstrates the behavior of the two-input NOR gate in ternary logic, showing all
possible combinations of input states and their corresponding output states. It illustrates that the output
is low (-1) only when both inputs are high (1), and remains neutral (0) otherwise.
15
Truth Table for Three-Input NOR Gate:
Input A Input B Input C Output
111 1
11 0 0
11 1 1
1 0 1 0
1 0 0 0
1 0 1 1
1 1 11
1 1 0 1
1 1 1 1
011 0
01 0 0
01 1 1
0 0 1 0
0 0 0 0
0 0 1 1
0 1 11
0 1 0 1
0 1 1 1
1111
11 0 1
11 1 1
1 0 11
1 0 0 1
1 0 1 1
1 1 11
1 1 0 1
1 1 1 1
A
B
C
Y
Three-Input NOR Gate
The truth table illustrates the behavior of the three-input NOR gate in ternary logic, showcasing all
possible combinations of input states alongside their corresponding output states. It demonstrates that
the gate produces a low output (0) only when all three inputs are high (1). If any input is neutral (0) or
low (-1), the output becomes high (1).
The three-input NOR gate serves as a fundamental component in digital circuits, facilitating various
logical operations essential for processing ternary data efficiently. Its application extends across diverse
domains, including digital signal processing, communication systems, and computational logic, where
precise management of data flow and decision-making is imperative.
XOR Gate for Ternary Logic (0, 1, -1)
Definition: The XOR gate in ternary logic acts as a logical operator that produces a high output (1)
if the sum of the inputs is either exactly 1 or -1 and yields a low state (-1) if all inputs are the same. It
returns a neutral state (0) when any inputs are neutral.
Function: The primary function of the XOR gate is to perform exclusive disjunction, ensuring that
the output signal is high (1) only when the sum of the inputs is either 1 or -1 and low (-1) when both
inputs are the same.
16
Truth Table for Two-Input XOR Gate:
Input A Input B Output
111
1 0 0
1 1 1
01 0
0 0 0
0 1 0
11 1
1 0 0
1 1 1
A
BY
Two-Input XOR Gate
The truth table demonstrates the behavior of the two-input XOR gate in ternary logic, displaying all
possible combinations of input states and their corresponding output states. It shows that the output is
high (1) only when the sum of the inputs is either 1 or -1, and remains neutral (0) when both inputs are
the same.
Truth Table for Three-Input XOR Gate:
Input A Input B Input C Output
1111
11 0 1
11 1 1
1 0 11
1 0 0 0
1 0 1 0
1 1 11
1 1 0 0
1 1 1 1
0111
01 0 0
01 1 0
0 0 1 0
0 0 0 0
0 0 1 0
0 1 1 0
0 1 0 0
0 1 1 0
1111
11 0 0
11 1 1
1 0 1 0
1 0 0 0
1 0 1 0
1 1 1 1
1 1 0 0
1 1 1 1
17
A
B
COutput
First XOR Gate
Second XOR Gate
Y
The truth table illustrates the behavior of the three-input XOR gate in ternary logic, showcasing all
possible combinations of input states alongside their corresponding output states. It demonstrates that
the gate produces a high output (1) if the sum of the inputs is either exactly 1 or -1, a neutral output
(0) if the sum of the inputs is zero or all inputs are different, and a low output (-1) if all inputs are the
same.
The three-input XOR gate serves as a fundamental component in digital circuits, facilitating various
logical operations essential for processing ternary data efficiently. Its application extends across diverse
domains, including digital signal processing, communication systems, and computational logic, where
precise management of data flow and decision-making is imperative.
XNOR Gate for Ternary Logic (0, 1, -1)
Definition: The XNOR gate in ternary logic acts as a logical operator that produces a high output (1)
if all inputs are the same. It yields a neutral state (0) if the sum of the inputs is either exactly 1 or -1,
and outputs a low signal (-1) when the sum of the inputs is neither 1 nor -1.
Function: The primary function of the XNOR gate is to perform exclusive NOR, ensuring that the
output signal is high (1) only when both inputs are the same, and neutral (0) when the sum of the inputs
is either 1 or -1.
Truth Table for Two-Input XNOR Gate:
Input A Input B Output
11 1
1 0 0
1 1 1
01 0
0 0 0
0 1 0
111
1 0 0
1 1 1
18
A
BY
Two-Input XNOR Gate
The truth table demonstrates the behavior of the two-input XNOR gate in ternary logic, displaying
all possible combinations of input states and their corresponding output states. It shows that the output
is high (1) when both inputs are the same, neutral (0) when the sum of the inputs is either 1 or -1, and
low (-1) otherwise.
Truth Table for Three-Input XNOR Gate:
Input A Input B Input C Output
111 1
11 0 1
11 1 1
1 0 1 1
1 0 0 0
1 0 1 0
1 1 1 1
1 1 0 0
1 1 1 1
011 1
01 0 0
01 1 0
0 0 1 0
0 0 0 0
0 0 1 0
0 1 1 0
0 1 0 0
0 1 1 0
111 1
11 0 0
11 1 1
1 0 1 0
1 0 0 0
1 0 1 0
1 1 11
1 1 0 0
1 1 1 1
19
A
B
COutput
First XNOR Gate
Second XNOR Gate
Y
The truth table illustrates the behavior of the three-input XNOR gate in ternary logic, showcasing
all possible combinations of input states alongside their corresponding output states. It demonstrates
that the gate produces a high output (1) if the sum of the inputs is zero or all inputs are the same, a
neutral output (0) if the sum of the inputs is either exactly 1 or -1, and a low output (-1) if the sum of
the inputs is neither zero nor the inputs are all the same.
The three-input XNOR gate serves as a fundamental component in digital circuits, facilitating various
logical operations essential for processing ternary data efficiently. Its application extends across diverse
domains, including digital signal processing, communication systems, and computational logic, where
precise management of data flow and decision-making is imperative.
Buffer Gate for Ternary Logic (0, 1, -1)
Definition: The Buffer gate in ternary logic functions as a logical operator that outputs the same state
as its input. Specifically, it produces: - A high output (1) if the input is high (1). - A low output (-1) if
the input is low (-1). - A neutral output (0) if the input is neutral (0).
Function: The primary function of the Buffer gate is to perform signal passing without alteration,
ensuring that the output signal is the same as the input signal.
Truth Table for Buffer Gate: Input Output
11
0 0
1 1
A Y
Buffer Gate
The truth table illustrates the behavior of the Buffer gate in ternary logic, showcasing all possible
20
combinations of input states and their corresponding output states. The gate functions by outputting
the same state as its input.
Specifically, it produces: - A high output (1) if the input is high (1). - A low output (-1) if the input
is low (-1). - A neutral output (0) if the input is neutral (0).
This functionality ensures that the output signal is the same as the input signal, allowing for versatile
logical operations and signal integrity.
4 Experimental Setup and Implementation
Hardware and Software
The experiments were conducted on a Dell OptiPlex 7050 with an Intel Core i7 processor and an NVIDIA
GT730 4 GB low-profile VRAM GPU. The software environment included Python and Google Colab on
a CPU runtime.
4.1 Simulation and Python Code
Here, we present the details of the simulations conducted for ternary logic gates using Python code.
Each logic gate is implemented as a separate function or a combination of functions, and the outputs for
various input combinations are displayed.
Figure 1: Python Code for All the One Input Logic Gates, with accompanying outputs
21
Figure 2: Python Code for All the Two Input Logic Gates, with accompanying outputs
22
Figure 3: Python Code for All the Three Input Logic Gates, with accompanying outputs
23
4.2 Discussion
The results of the simulations aligned perfectly with the expected theoretical behavior of ternary logic
gates. Each logic gate, whether it was a single input, two inputs, or three inputs, produced outputs
that matched the theoretical predictions for various input combinations. This congruence reinforces
the validity of the implemented functions and their adherence to the principles of ternary logic. There
were no discrepancies between the simulated results and theoretical predictions, which underscores the
accuracy and reliability of the Python code used.
Comparison with Binary Logic
Balanced ternary logic gates offer a significant departure from traditional binary logic by introducing a
third state. This can potentially reduce the complexity of certain computations. For instance, operations
that require multiple binary gates to achieve a particular function can sometimes be accomplished with
fewer ternary gates.
Performance and Efficiency
The Python code used for the simulations was efficient in handling the ternary logic gates. The wrap-
per functions (e.g., wrapper one,wrapper two, and wrapper three) effectively iterated through all
possible input combinations, and the results were displayed promptly. There were no significant per-
formance bottlenecks or computational challenges observed during the simulations. While it is worth
noting that while we did not encounter performance issues with balanced ternary logic, discrepancies
might be observed if the ternary logic were unbalanced. However, this was not within the scope of our
current experiments.
Limitations and Future Work
Despite the success of the simulations, there were limitations in the scope of the study. The Python
code, while effective for simulation purposes, could not simulate actual hardware implementing balanced
ternary logic gates. Additionally, the study was limited to basic ternary logic gates; we must explore
more complex operations and their potential benefits. Future work should focus on exploring hardware
implementations and investigating more complex ternary circuits.
In conclusion, the simulations of ternary logic gates using Python code have provided valuable in-
sights into their behavior, performance, and potential applications. The benefits of ternary logic in
reducing complexity and enhancing computational efficiency are promising avenues for future research
and development.
5 Applications of Ternary Logic Gates
Ternary logic gates, which operate on three states (-1, 0, 1), offer several advantages over traditional
binary logic gates. This section explores the potential applications of ternary logic gates and presents
real-life case studies demonstrating their practical benefits.
5.1 Potential Applications
The potential applications of ternary logic gates are vast and varied, encompassing improvements in data
density, circuit complexity, signal processing, and error detection and correction:
Increased Data Density: Ternary logic can represent more information per unit compared to
binary logic. A ternary digit (trit) can represent one of three states, thereby enhancing data storage
capacity and processing power. This increased data density can be particularly advantageous in
areas such as memory storage and digital communication.
Reduction in Circuit Complexity: Certain logic functions and arithmetic operations can be
implemented more efficiently using ternary logic, leading to simpler and more compact circuit
designs. This can reduce the number of required components, lower manufacturing costs, and
improve reliability.
24
Enhanced Signal Processing: Ternary logic systems can process multiple levels of signals,
making them suitable for advanced signal processing tasks. They can handle analog signals more
effectively by converting them into ternary digital signals, preserving more information than a
binary system.
Improved Error Detection and Correction: Ternary systems can enhance error detection
and correction mechanisms in digital communication systems. The additional state in ternary
logic can be used to represent error conditions or redundancy information, enabling more robust
error handling.
5.2 Case Studies
To illustrate the practical benefits of implementing ternary logic gates, several real-life case studies are
presented below:
Ternary Computing Systems : One of the pioneering efforts in ternary computing was conducted
by Setun, a ternary computer developed in the Soviet Union in 1958. Setun demonstrated the feasi-
bility and advantages of ternary computing, such as simpler circuit design and potentially lower power
consumption. More recently, researchers at the University of Rochester developed a ternary content-
addressable memory (TCAM) that significantly outperformed binary counterparts in terms of speed and
energy efficiency for search operations.
Memory Storage : In recent years, researchers have explored ternary logic for improving memory
storage technologies. For example, a study published in IEEE Transactions on Electron Devices discussed
the development of a ternary SRAM cell that could store more data in the same physical space as a
binary SRAM cell, thus increasing data density. Additionally, researchers at Stanford University have
investigated the use of carbon nanotube transistors to create ternary memory cells, which offer higher
storage capacity and efficiency.
Digital Signal Processing : Ternary logic gates have found applications in digital signal processing.
For instance, a study presented at the IEEE International Symposium on Circuits and Systems demon-
strated the use of ternary logic in designing digital filters that offer better performance and reduced
power consumption compared to their binary counterparts. This research highlights the potential of
ternary logic in enhancing the efficiency and accuracy of signal processing systems.
Quantum Computing : Ternary logic has potential applications in the field of quantum computing.
Researchers have been investigating the use of ternary quantum bits (qutrits) for quantum information
processing. Qutrits can exist in superpositions of three states, offering higher computational power
and more efficient algorithms compared to binary quantum bits (qubits). Studies published in Nature
Communications and Physical Review Letters have demonstrated the potential of qutrits in quantum
computing, showing improved error correction capabilities and more efficient quantum algorithms.
Artificial Intelligence : In artificial intelligence (AI) and machine learning (ML) applications, ternary
logic can enhance the performance of neural networks. A notable example is the development of ternary
neural networks (TNNs), which use ternary weights instead of binary or continuous weights. Research
published in Neural Networks and IEEE Transactions on Neural Networks and Learning Systems has
shown that TNNs can achieve competitive accuracy while significantly reducing computational complex-
ity and power consumption, making them suitable for deployment in resource-constrained environments.
These case studies highlight the potential of ternary logic gates to revolutionize various aspects of
digital electronics and computing. As research and development in this field continue to advance, we
can expect to see more innovative applications and breakthroughs leveraging the unique advantages of
ternary logic.
6 Conclusion
We explored the concept and implementation of balanced ternary logic gates, which extend traditional
binary logic by introducing a third state. This third state, often represented as -1, 0, and +1, allows for
25
more complex and nuanced logical operations compared to the binary system’s simple 0 and 1 states.
Our study demonstrated the functionality and behavior of basic ternary logic gates, including OR, AND,
NOT, buffer, NOR, XOR, and XNOR gates. Additionally, we extended our exploration to include 2-input
and 3-input logic gates, offering a comprehensive analysis of their operations and potential applications.
To validate the performance and correctness of the ternary logic gates, we utilized a two-pronged
approach involving theoretical derivations and practical simulations using Python code. The theoretical
derivations provided a mathematical foundation for understanding how these gates should operate under
various input conditions. In parallel, the Python simulations allowed us to observe the behavior of
these gates in a controlled environment. The results from the simulations were meticulously compared
with the theoretical expectations, and they perfectly aligned, confirming the accuracy and reliability of
our implementations. We observed no discrepancies between the simulated results and the theoretical
predictions, underscoring the robustness of the ternary logic models.
Ternary logic gates offer several advantages over traditional binary logic gates. One of the most
significant benefits is the potential for reduced circuit complexity. Because ternary logic can represent
more information per digit, it can simplify certain types of circuits and reduce the number of gates
required for specific operations. This reduction in complexity can lead to smaller, more efficient circuit
designs. Additionally, ternary logic increases data density, which means that more information can
be processed and stored in the same amount of space compared to binary systems. Enhanced signal
processing capabilities are another advantage, as ternary logic can provide more granular control and
representation of signals.
These benefits make ternary logic a promising alternative for various advanced computing applica-
tions. In digital signal processing, for instance, ternary logic can improve the precision and efficiency
of algorithms. Quantum computing, which already relies on complex mathematical principles, could
also benefit from the introduction of ternary logic, potentially simplifying certain quantum algorithms
and operations. More efficient arithmetic operations are another area where ternary logic could have a
significant impact, offering faster and more accurate calculations.
Our study faced no significant performance bottlenecks or computational challenges during the simu-
lations, demonstrating that the Python code used was well-optimized for this purpose. The efficiency of
the code ensures that it can be used for extensive simulations without encountering delays or requiring
excessive computational resources. This optimization is crucial for real-time applications where quick
and accurate processing is essential.
While our research focused on balanced ternary logic, we did not experiment with unbalanced ternary
logic. Unbalanced ternary logic, where the three states are not equidistant or symmetrically placed
around zero, could offer additional benefits or present unique challenges. Future research in this area
could provide additional insights and identify potential areas for further refinement. Exploring unbal-
anced ternary logic could reveal new ways to optimize circuits and algorithms, potentially leading to
even more efficient and powerful computing systems.
The implementation and analysis of ternary logic gates in this study have expanded the understanding
and potential utilization of ternary logic in digital systems. The results highlight the flexibility and
advantages of ternary logic, paving the way for future research and development in this field. Further
work should focus on optimizing the code for real-time applications, exploring hardware implementations,
and investigating more complex ternary circuits to fully harness the potential of ternary logic in modern
computing technologies.
Optimizing the code for real-time applications is a critical next step. While our simulations were
efficient, translating these algorithms into real-time applications requires consideration of factors such as
execution speed, memory usage, and integration with existing hardware. Additionally, exploring hard-
ware implementations of ternary logic gates could provide valuable insights into their practical feasibility
and performance. Developing ternary logic circuits on silicon, for instance, would allow researchers to
test their real-world applications and identify any physical constraints or challenges.
Investigating more complex ternary circuits is another important area for future research. Simple
logic gates form the building blocks of more complex digital systems, so understanding how to efficiently
design and implement larger ternary systems is crucial. This includes studying multi-layered circuits,
integrated ternary systems, and the interplay between ternary and binary logic in hybrid systems.
In conclusion, the research presented in this paper demonstrates the potential of balanced ternary
logic gates to revolutionize digital systems. By providing a thorough theoretical and practical analysis of
these gates, we have laid the groundwork for future advancements in this field. The flexibility, efficiency,
and enhanced capabilities of ternary logic offer a promising avenue for developing next-generation com-
puting technologies, from digital signal processing and quantum computing to more efficient arithmetic
26
operations. Future research and development efforts should continue to explore and refine ternary logic,
unlocking its full potential and paving the way for innovative computing solutions.
Disclosure
This paper was authored by Pearl Bipin Pulickal, a Bachelor of Technology in Electronics and Commu-
nication Engineering from the National Institute of Technology Goa, Cuncolim, Goa, India. Pearl Bipin
made significant contributions to this research and can be contacted via email at pearlbipin@gmail.com.
Yash Jesus Diniz, a Bachelor of Engineering in Computer Science Engineering from Don Bosco College
of Engineering, Fatorda, Goa, India (affiliated to Goa University), contributed details on memristors, sim-
ulations, ternary base operations, and logic gates. He can be reached via email at yashdiniz@gmail.com.
Dr. Trilochan Panigrahi, an Associate Professor of Electronics and Communication Engineering at the
National Institute of Technology Goa, Cuncolim, Goa, India, contributed by proofreading and correcting
errors, as well as verifying logic in electronics. He can be reached via email at tpanigrahi@nitgoa.ac.in.
While AI chatbots, including ChatGPT and Microsoft Copilot, were employed as tools to aid in the
writing process, the original ideas, methodologies, and all other aspects of the paper are the result of the
intellectual contributions of Pearl Bipin, Yash Jesus Diniz, and Dr. Trilochan Panigrahi. The utilization
of AI tools was aimed at enhancing efficiency and productivity, complementing the authors’ original
work.
In summary, this paper represents a collaborative effort between Pearl Bipin, Yash Jesus Diniz, Dr.
Trilochan Panigrahi, and AI chatbots, with each contributing to the creation of the final manuscript.
The authorship of the paper remains with Pearl Bipin, Yash Jesus Diniz, and Dr. Trilochan Panigrahi,
who served as the primary contributors to the research.
Acknowledgments
My heartfelt thanks extend to my co-author, Yash Jesus Diniz, for his invaluable contributions to this
research endeavor. His expertise in software engineering and deep understanding of ternary operations,
memristors, Python simulations, and ternary logic gates have been instrumental in shaping the outcome
of this work.
I would also like to express my gratitude to my co-author, Dr. Trilochan Panigrahi, for his guidance
and support throughout this research. His expertise in electronics and communication engineering,
particularly in Distributed Signal Processing, Array Signal Processing, IoT, and Nano WSN, has been
essential in refining the research methodology and verifying the accuracy of our findings.
I am grateful to my mentors from Reliance Jio, Mr. Dixit Nahar and Mr. Pranav Naik, for their
guidance and encouragement.
I am thankful to Dr. Anirban Chatterjee from NIT Goa, whose emphasis on the importance of
academic contributions and publication in scientific journals has motivated me to undertake this endeavor
despite my primarily professional background.
Special acknowledgment is due to my mathematics teachers from Indian School Al Ghubra, Muscat,
Oman, Mrs. Shiny Joshi and Mr. Mohammed Farook, whose unwavering support and mentorship have
been instrumental in my academic and personal growth.
Heartfelt gratitude is extended to my parents, Mr. Bipin Zacharia and Mrs. Honey Bipin, whose
unwavering support and encouragement have been the cornerstone of my journey.
Special thanks to my professors at NIT Goa, Dr. Trilochan Panigrahi, Dr. Anirban Chatterjee, and
Dr. Lokesh Bramhane, for their guidance and support throughout this endeavor.
I would also like to express my appreciation to Dr. Sunil Kumar of the Economics Department at
NIT Goa for his valuable advice and encouragement.
27
My heartfelt thanks go to Brenner D’Costa for his guidance and advice in the field of data science.
I express my gratitude to Sam Altman of OpenAI, Satya Nadella, the inventors and contributors of
Wolfram Alpha and Llemma for their pioneering contributions to the field of artificial intelligence and
computational tools.
I am grateful to Dr. Pramod Maurya and Dr. Prakash Mehra of CSIR-NIO Goa for their inspiration
and guidance during my internship.
I extend my thanks to Virendra Yadav for his valuable insights on scientific paper writing.
Special acknowledgment is due to Dr. Lalat Indu Giri for nurturing my creativity from the outset of
my college journey.
Finally, I would like to express my heartfelt appreciation to my lifelong friends from Indian School Al
Ghubra, Kevin Antony, Ignatius Raja, Aaron Xavier Lobo, and Rishab Mohanty, for their unwavering
support and companionship throughout the years.
References
[1] Seger, R. X. (2016). Exploring ternary logic: TNAND and TAND gates. Medium.
[2] Rani, P. M. N., & Lyngton Thangkhiew, P. (2022). An Overview of Different Approaches for Ternary
Reversible Logic Circuits Synthesis Using Ternary Reversible Gates with Special Reference to Virtual
Reality. SpringerLink.
[3] (2020). Design of ternary logic gates and circuits using GNRFETs. IET.
[4] (2016). Memristor based unbalanced ternary logic gates. Springer.
[5] (2020). Design of Ternary Logic and Arithmetic Circuits Using GNRFET. UM System.
[6] Balanced Ternary Logic Gates with Memristors. IEEE Xplore.
[7] Ternary combinational logic gates design based on tri-valued memristors. ResearchGate.
[8] A review on the design of Ternary Logic Circuits. ResearchGate.
[9] (2021). Design of Ternary Logic Gates Using Carbon Nanotube Field Effect Transistors. IEEE Trans-
actions on Nanotechnology.
[10] K. H. Mekki and A. S. Al-Zahrani, ”Performance Analysis of Ternary Logic Gates in Quantum-dot
Cellular Automata,” International Journal of Circuit Theory and Applications, vol. 47, no. 3, pp.
371-386, 2019.
28
Appendix
Additional Notes
Ternary Logic Gates Explained in a Simple Manner
Understanding Ternary Logic Gates
In the world of computers and electronics, we are used to dealing with binary logic, which uses only two
states: 0 and 1. However, ternary logic introduces a third state, which can be extremely useful in certain
situations. These three states are:
0(off/false)
1(on/true)
-1 (another type of ”on” or ”true”)
Why Ternary Logic?
Ternary logic can handle more information with fewer elements compared to binary logic. This can
simplify certain calculations and processes in computing, potentially making them more efficient.
Example in Everyday Life
Imagine you have a light switch. In binary logic, the switch can either be off (0) or on (1). Now imagine
a dimmer switch that has three settings: off (0), medium (1), and bright (-1). This is similar to ternary
logic, where you have an additional state to represent another level of information.
Ternary Logic Gates
Just like binary logic has gates (AND, OR, NOT), ternary logic also has its gates. These gates process
the ternary inputs (0, 1, -1) and produce an output based on certain rules.
Basic Ternary Gates
Here are a few basic ternary logic gates explained in simple terms:
Ternary NOT Gate (T-Not)
The T-Not gate inverts the input. However, 0 is considered a neutral signal and remains unchanged.
The inversion rules are:
If the input is 0, the output is 0.
If the input is 1, the output is -1.
If the input is -1, the output is 1.
Think of it like this: the T-Not gate flips the input to its opposite state if it is an extreme value (1
or -1), but if the input is neutral (0), it remains the same. It’s like having a dimmer switch where the
medium setting stays unchanged, while the other settings flip.
Ternary AND Gate (T-And)
The T-And gate works similar to the binary AND gate but with three states. The output is based on
the ”minimum” value of the inputs.
If any input is 0, the output is 0(like a red light stopping the process).
If both inputs are 1, the output is 1.
If both inputs are -1, the output is -1.
If one input is 1and the other is -1, the output is -1 (because -1 is less than 1).
Think of it as a gate that passes the least powerful signal. If you imagine a voting system where the
lowest vote decides the outcome, this is how the T-And gate operates.
29
Ternary OR Gate (T-Or)
The T-Or gate is similar to the binary OR gate but with three states. The output is based on the
”maximum” value of the inputs.
If any input is 1, the output is 1(like a green light allowing the process to continue).
If both inputs are 0, the output is 0.
If both inputs are -1, the output is -1.
If one input is 0and the other is -1, the output is 0(because 0 is greater than -1).
Think of it as a gate that passes the most powerful signal. If you imagine a voting system where the
highest vote decides the outcome, this is how the T-Or gate operates.
Examples
Let’s see some examples to understand how these gates work:
T-Not Example:
Input: 0
Output: 0
Input: 1
Output: -1
Input: -1
Output: 1
T-And Example:
Input: 1and 0
Output: 0
Input: 1and -1
Output: -1
Input: -1 and -1
Output: -1
T-Or Example:
Input: 0and -1
Output: 0
Input: 1and 0
Output: 1
Input: -1 and -1
Output: -1
Summary
Ternary logic uses three states: 0, 1, and -1.
Ternary logic gates (T-Not, T-And, T-Or) operate on these three states with specific rules.
These gates can simplify certain calculations and make some processes more efficient.
30
Applications of Ternary Logic
Ternary logic can be used in various fields such as:
Data Storage: More states mean more data can be stored in the same physical space.
Signal Processing: Ternary logic can simplify the processing of certain signals.
Artificial Intelligence: More nuanced decision-making processes can be designed with three
states.
By understanding and utilizing ternary logic, we can explore new frontiers in computing and tech-
nology.
Glossary
Logic Gates Fundamental building blocks of digital circuits that perform logical operations on binary
inputs.
Ternary Base A numerical system with a base of three, allowing representation of numbers using digits
0, 1, and -1.
Digital Systems Systems that process and transmit digital signals, typically using logic gates to per-
form operations.
OR Gate A logic gate that produces a high output (1) if at least one of its inputs is high (1).
NOT Gate A logic gate that produces the logical complement of its input.
Buffer Gate A logic gate that outputs the same value as its input, essentially amplifying the input
signal.
NOR Gate A logic gate that produces a high output (1) only if all of its inputs are low (0).
AND Gate A logic gate that produces a high output (1) only if all of its inputs are high (1).
XOR Gate A logic gate that produces a high output (1) if the number of high inputs is odd.
XNOR Gate A logic gate that produces a high output (1) if the number of high inputs is even.
2-input Refers to logic gates with a fan-in of two inputs.
3-input Refers to logic gates with a fan-in of three inputs.
31
Pearl Bipin Pulickal
Pearl Bipin Pulickal is an accomplished data scientist who graduated with a Bachelor of Technology
(B.Tech.) in Electronics and Communication Engineering from the National Institute of Technology
(NIT) Goa, India, in 2024. Hailing from Porvorim, Goa, Pearl’s journey embodies excellence in academia
and professional realms alike.
As the Chief Data Scientist of Pearl Data Consultancy Services, he spearheads transformative data
initiatives, ensuring integrity and fostering innovation. Pearl’s expertise spans data analysis, machine
learning, and mathematical modeling, backed by endorsements from industry stalwarts like Dr. Prakash
Mehra of CSIR-NIO. At Reliance Jio, Pearl’s prowess in machine learning shone as he developed advanced
models under the guidance of Senior Scientist Dixit Nahar.
His research contributions underscore his thought leadership in mathematics, machine learning, and
artificial intelligence.
Yash Jesus Diniz
Yash Jesus Diniz is an accomplished and versatile software engineer and computer science engineering
graduate of Don Bosco College of Engineering, Fatorda, Margao, Goa, India. He received his Bachelor of
Engineering (B.E.) degree in Computer Science Engineering in 2021, following his diploma in Computer
Engineering from Agnel Polytechnic in 2018.
Currently, the Chief Technology Officer of Spyke Social Private Limited and Tech Lead at Velocilabs,
he is actively involved in leading technological innovations and driving software development initiatives.
Velocilabs is a startup focusing on cutting-edge technologies and innovative solutions.
He possesses extensive knowledge of memristors and has conducted significant research in ternary logic
gates. His expertise extends across various domains, including software engineering, machine learning,
and optimization techniques. He has a proven track record of performing well in software engineering,
contributing to robust and scalable software solutions.
Passionate about technology and innovation, he continues to explore new avenues in computer science,
leveraging his expertise to develop groundbreaking solutions. He resides in Raia, Goa, India.
32
Dr. Trilochan Panigrahi
Dr. Trilochan Panigrahi is an Associate Professor in the Department of Electronics and Communication
Engineering at the National Institute of Technology (NIT), Goa, located in Cuncolim, Goa, India. With
a research focus on Distributed Signal Processing, Array Signal Processing, IoT, Nano WSN (Wireless
Sensor Networks), and their applications in various domains, Dr. Panigrahi brings extensive expertise
and passion to his academic and research endeavors.
Dr. Panigrahi completed his Ph.D. in Electronics and Communication Engineering from the presti-
gious National Institute of Technology (NIT), Rourkela, India, in 2012. His doctoral research delved into
the intricacies of signal processing algorithms for wireless sensor networks, exploring innovative solutions
to enhance network efficiency and performance. Prior to his doctoral studies, he obtained his M.Tech.
in Electronics and Communication Engineering from the National Institute of Science and Technology,
Berhampur, in 2005, where he laid the foundation for his future contributions to the field.
Throughout his academic journey, Dr. Panigrahi has demonstrated a deep commitment to advancing
the fields of electronics and communication engineering. He has a proven track record of academic
excellence and research prowess, coupled with a keen interest in nurturing the next generation of engineers
and researchers. As a respected educator, mentor, and researcher, Dr. Panigrahi is actively involved in
shaping the academic landscape at NIT Goa, fostering a culture of innovation and research excellence
within the department.
Dr. Panigrahi’s contributions to the field of electronics and communication engineering are reflected
in his numerous publications in reputable journals and conferences. His research endeavors are driven by
a passion for addressing real-world challenges and exploring emerging technologies. He is a distinguished
researcher and scholar renowned for his contributions to the field of wireless sensor networks and signal
processing. His expertise encompasses a wide range of topics, including distributed estimation, channel
estimation, direction-of-arrival estimation, and optimization techniques in wireless environments.
His academic journey includes significant achievements such as winning the Best Paper Award at
the ICIT Conference in December 2009, showcasing his research excellence and innovative thinking.
Dr. Panigrahi has been actively involved in prestigious projects, serving as a Project Associate in the
UKIERI Project from 2008 to 2012, where he collaborated with international partners to address key
challenges in wireless communication systems. He also held the position of Visiting Research Scholar at
the University of Edinburgh, UK, for three months each summer from 2008 to 2010, gaining valuable
insights and experiences in a global research environment.
During his academic pursuits, Dr. Panigrahi received an Institute Fellowship for his Ph.D. program at
NIT Rourkela from June 2008 to February 2012, in recognition of his outstanding academic performance
and research potential. Additionally, he was a recipient of the MHRD Scholarship during his M.Tech.
studies from 2003 to 2005, further highlighting his academic achievements and dedication to excellence.
Beyond his academic endeavors, Dr. Panigrahi is actively engaged in industry collaborations and
outreach activities, bridging the gap between academia and industry. He collaborates with leading orga-
nizations to translate research findings into practical applications, driving innovation and technological
advancements in the field of electronics and communication engineering.
You can reach Dr. Trilochan Panigrahi via email at tpanigrahi@nitgoa.ac.in. Residing in Cuncolim,
Goa, India, he continues to inspire and contribute to the academic and research community at NIT Goa
through his teaching, research, industry engagements, and dedication to excellence.
33
... Pulickal Bipin, Diniz, and Panigrahi [3] present an in-depth examination of ternary logic gates, which operate using three distinct states: -1, 0, and 1. Their research highlights the benefits of ternary logic in digital circuitry, such as improved information density and reduced complexity compared to traditional binary systems. ...
Research
Full-text available
Background: In traditional logic systems, direct current (DC) voltages are represented by the states +1, 0, and-1, while alternating current (AC) is often overlooked in logic representations. The imaginary unit i, known for its oscillatory nature, provides a novel way to represent AC voltages, given its inherent property of cycling between negative and positive values upon squaring. This paper extends the logic system by introducing the concept of super and hyper AC voltages, represented by super and hyper imaginary numbers, derived from the square root of the negative i. Objectives: This study aims to explore the mathematical and logical implications of representing AC voltages with i, and further extending this concept to super and hyper imaginary numbers for more complex alternating systems. The objective is to propose a new paradigm in voltage theory that can enhance the understanding and manipulation of oscillatory electrical states. Methods: Through rigorous mathematical analysis and logical modeling, we explore the characteristics of super and hyper AC voltages, examining their properties and potential applications in advanced electronic systems. The research delves into the iterative process of alternating already alternating currents and the resulting hyper-complex voltage states. Results: The findings illustrate the feasibility of using super and hyper imaginary numbers to represent increasingly complex AC voltages. These results open up possibilities for new types of signal processing, electronic design, and voltage manipulation, significantly expanding the theoretical framework of voltage representation. Conclusions: By redefining AC voltage through the lens of imaginary, super and hyper imaginary numbers, this research introduces a groundbreaking concept in voltage theory. The super and hy-per AC paradigms present a new frontier in electrical engineering, offering a deeper understanding of oscillatory states and paving the way for innovative applications in electronic circuit design and beyond.
... Pulickal Bipin, Diniz, and Panigrahi [3] present an in-depth examination of ternary logic gates, which operate using three distinct states: -1, 0, and 1. Their research highlights the benefits of ternary logic in digital circuitry, such as improved information density and reduced complexity compared to traditional binary systems. ...
Research Proposal
Full-text available
Background: In traditional logic systems, direct current (DC) voltages are represented by the states +1, 0, and-1, while alternating current (AC) is often overlooked in logic representations. The imaginary unit i, known for its oscillatory nature, provides a novel way to represent AC voltages, given its inherent property of cycling between negative and positive values upon squaring. This paper extends the logic system by introducing the concept of super and hyper AC voltages, represented by super and hyper imaginary numbers, derived from the square root of the negative i. Objectives: This study aims to explore the mathematical and logical implications of representing AC voltages with i, and further extending this concept to super and hyper imaginary numbers for more complex alternating systems. The objective is to propose a new paradigm in voltage theory that can enhance the understanding and manipulation of oscillatory electrical states. Methods: Through rigorous mathematical analysis and logical modeling, we explore the characteristics of super and hyper AC voltages, examining their properties and potential applications in advanced electronic systems. The research delves into the iterative process of alternating already alternating currents and the resulting hyper-complex voltage states. Results: The findings illustrate the feasibility of using super and hyper imaginary numbers to represent increasingly complex AC voltages. These results open up possibilities for new types of signal processing, electronic design, and voltage manipulation, significantly expanding the theoretical framework of voltage representation. Conclusions: By redefining AC voltage through the lens of imaginary, super and hyper imaginary numbers, this research introduces a groundbreaking concept in voltage theory. The super and hy-per AC paradigms present a new frontier in electrical engineering, offering a deeper understanding of oscillatory states and paving the way for innovative applications in electronic circuit design and beyond.
... Pulickal Bipin, Jesus Diniz, and Panigrahi [1] provide a comprehensive exploration of ternary logic, specifically focusing on the design and implementation of ternary logic gates. The study offers valuable insights into the fundamental principles of ternary logic and highlights the advantages of using ternary gates in digital circuitry. ...
Research Proposal
Full-text available
Background: Ternary logic gates, utilizing the base-1, 0, 1, represent a departure from conventional binary systems, offering expanded states for digital representation. This paper explores the integration of the imaginary unit i within ternary logic, introducing new dimensions to computing paradigms beyond traditional binary logic gates. Objectives: Our study aims to demonstrate the versatility and universality of NAND gates within ternary logic, utilizing the states-1, 0, 1, and investigating the implications of i in enhancing logic operations and system functionalities. Methods: Employing logical analysis and mathematical modeling, we design and implement NAND gates in a ternary logic framework to showcase their ability to construct diverse logic gates effectively. Results: Theoretical derivations and simulations illustrate the robustness of NAND gates in constructing various ternary logic gates, underscoring their functional completeness and computational efficiency. Conclusions: By integrating NAND gates with the imaginary unit i, this research not only repli-cates traditional binary logic functionalities but also explores novel applications in digital systems. The interpretations of i within ternary logic, such as symbolizing extreme cold or reactive states akin to dry ice, or representing oscillatory characteristics similar to AC currents, broaden the theoretical and practical understanding of ternary logic systems. This study contributes to advancing electronic circuit design and computation by exploring these new dimensions of signal representation and processing.
Chapter
Quantum computing has been projected as an alternative to classical computing and promises to offer feasible solutions to problems that are considered intractable today. It has also been observed that information storage, processing, and communication can be improved to a great extent by the use of quantum mechanical effects like non-classical correlation and superposition of states. In a reversible circuit, we have a cascade of reversible gates each of which carry out some bijective mapping between inputs and outputs. They are also structurally different from conventional circuits in the sense that fanout and feedback connections are not permitted. In a binary quantum system expressed as a quantum circuit, the number of circuit lines represent the basic unit of information being processed (called quantum bits or qubits). Specifically, qutrit is the unit of information for a three-valued quantum system and is represented in one of the states such as 0|0\rangle , 1|1\rangle , and 2|2\rangle . As we know, qutrits are very much expensive resources in the synthesis process, and thus reducing the number of qutrits plays a major role during synthesis. The idea behind this work is to make the early researchers in this specific area to get a comprehensive understanding of ternary reversible logic synthesis. Hence, this work addresses the different ternary reversible logic synthesis approaches and thus allow the researchers to gain more knowledge about the process of ternary reversible logic synthesis in an efficient manner and also gives an insight of how quantum computing can be further explored in the broad area of augmented reality and virtual reality.
Exploring ternary logic: TNAND and TAND gates
  • R X Seger
Seger, R. X. (2016). Exploring ternary logic: TNAND and TAND gates. Medium.
Design of Ternary Logic Gates Using Carbon Nanotube Field Effect Transistors
(2021). Design of Ternary Logic Gates Using Carbon Nanotube Field Effect Transistors. IEEE Transactions on Nanotechnology.
Performance Analysis of Ternary Logic Gates in Quantum-dot Cellular Automata
  • K H Mekki
  • A S Al-Zahrani
K. H. Mekki and A. S. Al-Zahrani, "Performance Analysis of Ternary Logic Gates in Quantum-dot Cellular Automata," International Journal of Circuit Theory and Applications, vol. 47, no. 3, pp. 371-386, 2019.