0% found this document useful (0 votes)
13 views18 pages

DELD

The project report details the development of a digital calculator that performs basic arithmetic operations using digital logic circuits, including addition, subtraction, multiplication, and division, with results displayed on a seven-segment display. It integrates a Digital-to-Analog Converter (DAC) to enhance functionality by processing analog inputs, and utilizes various logic gates and components for its operations. The project serves as an educational tool, demonstrating the principles of digital electronics and providing hands-on experience in circuit design and implementation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views18 pages

DELD

The project report details the development of a digital calculator that performs basic arithmetic operations using digital logic circuits, including addition, subtraction, multiplication, and division, with results displayed on a seven-segment display. It integrates a Digital-to-Analog Converter (DAC) to enhance functionality by processing analog inputs, and utilizes various logic gates and components for its operations. The project serves as an educational tool, demonstrating the principles of digital electronics and providing hands-on experience in circuit design and implementation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

DIGITAL CALCULATOR

A PROJECT REPORT

submitted by

Ananadu A, B23ELA20
Anjana T, B23ELA22
Athila Zubair NV,B23ELA28
Mohammed Mizhab , B23ELA48
Ajmal MS , B23ELA68

as part of the project based course

23ERJ303 : Digital Electronics and Logic Design


in partial fulfillment of the requirements for the award of the Degree
of
Bachelor of Technology
In
Electrical and Computer Engineering

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING


T.K.M. COLLEGE OF ENGINEERING, KOLLAM
NOVEMBER, 2024
ABSTRACT
The project involves building a digital calculator that integrates an Digital-to-Analog. Initially, push-
button switches input binary numbers into full adders, which perform the addition operation. The results are
then converted to BCD format and displayed on a seven-segment display. The DAC is integrated to convert
digital inputs to analog signals, which the calculator then processes. The operations performed by the calculator
are addition, subtraction, division and multiplication. At its core, the system utilizes push-button switches to
input binary numbers into full adders, which form the foundation of its arithmetic capabilities. Once the
addition is complete, the results are converted to Binary-Coded Decimal (BCD) format. The BCD format is
then interpreted and displayed on a seven-segment display, providing clear and accessible results to the user.
The DAC inculcated marks a pivotal enhancement to the calculator’s functionality, enabling it to process analog
inputs by converting them into digital signals. the digital signals are then processed by the calculator’s internal
logic circuits. The realization using basic gates are implemented in addition using two XOR gates,one OR gates,
and one AND gates. The subtraction implementation is done using a binary parallel adder/subtractor. For
multiplication, it’s implemented using two full adders and three AND gates. The division is implemented using
four AND gates and one OR gate. The seven-segment display provides clear, real-time feedback, making the
calculator suitable for both educational and professional applications. This project not only demonstrates the
principles of digital logic and signal processing but also showcases the practical application of analog-to-digital
conversion in everyday computing devices.
Contents

Abstract 2

Contents 4

List of Figures 5

1 Introduction 1
1.1 Objective: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Concepts used from Digital Electronics and Logic Design: . . . . . . . . . . . . . . . . . . . . . 1
1.3 Components required and approximate cost: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Relevance of the Project 3


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Conclusion: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Methodology 4
3.1 Project design and Approach: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2 Working: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.3 Code for Arduino and circuit diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.4 Conclusion: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Results and Discussions 8


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Reference 9

5 Digital-to-Analog Converter 10
5.0.1 Introduction: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.0.2 Working: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.0.3 Methodology: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.0.4 Operation and circuit diagram: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5.0.5 Conclusion: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3
Appendix 13
List of Figures

3.1 Circuit diagram for Addition, subtraction and multiplication . . . . . . . . . . . . . . . . . . . 7


3.2 Circuit diagram for Addition, subtraction and multiplication . . . . . . . . . . . . . . . . . . . 7

5.1 DAC CIRCUIT DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5
Chapter 1

Introduction

A calculator is any machine that performs arithmetic operations using pre-programmed logic. This project
involves the integration of operations with an Analog-to-Digital Converter. By limiting this project to logic
gates the full knowledge of the digital logic design course has been harnessed in order to assemble this project.
The techniques involved in the simplification of the project involves reduction of expressions using karnaugh
maps , de Morgans law and through implementing boolean expressions.Arduino has been incorporated in the
project for the conversion of all signals to BCD.

1.1 Objective:
Building a digital calculator enables the practical understanding of basic gates in combinational circuits.It
provides hands-on experience with essential concepts in digital logic design.It provides hands-on experience with
essential concepts in digital logic design .This experience is invaluable in electronics and computer engineering,
as it provides insight into how digital systems handle data at the most basic level.

1.2 Concepts used from Digital Electronics and Logic Design:


1. Full Adder
2. Logic gates
3. BCD to seven-segment decoder
4. Digital to Analog Converter

1.3 Components required and approximate cost:


1. Full adder
2. BCD to seven-segment decoder
3. Seven Segment Display
4. Push button
5. Digital-to-Analog Converter

1
6. Power supply
Total cost : 1400
Chapter 2

Relevance of the Project

2.1 Introduction
Digital calculators built with logic circuits are significant in many reasons,particularly in gaining knowledge
of digital electronics, technology education and hardware design.It helps in the fundamental understanding of
computing, learning tools for digital logic and circuit design and emphasizing reliability. It serves as an educa-
tional tool which allow to understand digital logic,boolean algebra, binary arithmetic, and the basic of hardware
design.It perform consistent and reliable calculation without the need of software.Digital calculators made with
logic circuits are used in instruments where specific repetitive calculations are required.In environment with
limited power sources ,these calculators can be operated with less power.

2.2 Conclusion:
The digital calculator project highlights the importance of understanding foundational digital concepts such
as binary arithmetic, logic gate functionality, and circuit design. This project enables students to connect
theoretical principles with real-world applications in technology and engineering.

3
Chapter 3

Methodology

3.1 Project design and Approach:


The digital calculator consists of four main modules, adder circuit, subtractor circuit, divider circuit, and
multiplier circuit.The add-ons to these modules improves the functionality of the respective circuits. The
realization using basic gates are implemented in addition using two XOR gates,one OR gates, and one AND
gates. The subtraction implementation is done using a binary parallel adder/subtractor. For multiplication,
it’s implemented using two full adders and three AND gates. The division is implemented using four AND gates
and one OR gate. The development of the project involves the usage of protease for the circuit development.It
enables in the simulation of electronic circuits.

3.2 Working:
The working of the calculator is mainly driven by logic gates and is displayed on seven-segment display.The input
is typically binary digits given via switches or buttons, which are then directed to the logic circuit. For addition,
a binary adder circuit (using full adders) calculates the sum, while subtraction can be implemented through
two’s complement addition, where the subtracted number is inverted and added to perform the operation. The
multiplication is carried out through repeated addition method. Division is carried out for two bit. The power
supply is given through Arduino.The power supply from Arduino is passed to the circuits. Operations can be
selected subsequently. For doing certain operation,it is connected to positive terminal and others are connected
to ground. All the operations can be carried out in this format. The results are displayed in seven-segment
display simultaneously.

3.3 Code for Arduino and circuit diagram


// Define input pins (8-13)
const int inputPins[6] = 8, 9, 10, 11, 12, 13;

4
// Define output pins for tens digit (A, B, C, D)
const int tensA = 2;
const int tensB = 3;
const int tensC = 4;
const int tensD = 5;

// Define output pins for units digit (A, B, C, D)


const int unitsA = 6;
const int unitsB = 7;
const int unitsC = A0;
const int unitsD = A1;

void setup()
// Initialize input pins as INPUT
for (int i = 0; i ¡ 6; i++)
pinMode(inputPins[i], INPUT);

// Initialize output pins as OUTPUT


pinMode(tensA, OUTPUT);
pinMode(tensB, OUTPUT);
pinMode(tensC, OUTPUT);
pinMode(tensD, OUTPUT);

pinMode(unitsA, OUTPUT);
pinMode(unitsB, OUTPUT);
pinMode(unitsC, OUTPUT);
pinMode(unitsD, OUTPUT);

// Initialize serial communication for debugging (optional)


Serial.begin(9600);

void loop()
// Step 1: Read the 6-bit binary number from pins 8-13
int binaryNumber = 0;
for (int i = 0; i ¡ 6; i++)
binaryNumber —= (digitalRead(inputPins[i]) ¡¡ i);

// Step 2: Convert binary to decimal


int decimalNumber = binaryNumber; // Range: 0-63

// Step 3: Convert decimal to BCD


int tens = decimalNumber / 10; // Tens digit (0-6)
int units = decimalNumber

// Step 4: Prepare BCD for output


byte tensBCD = tens 0x0F; // Ensure it’s 4 bits
byte unitsBCD = units 0x0F;

// Optional: Print values to Serial Monitor for debugging


Serial.print(”Binary: ”);
Serial.print(binaryNumber, BIN);
Serial.print(” (”);
Serial.print(decimalNumber);
Serial.print(”) Tens BCD: ”);
Serial.print(tensBCD, BIN);
Serial.print(” Units BCD: ”);
Serial.println(unitsBCD, BIN);

// Step 5: Output tens digit to 7-segment decoder


digitalWrite(tensA, (tensBCD ¿¿ 0) 0x01); // A
digitalWrite(tensB, (tensBCD ¿¿ 1) 0x01); // B
digitalWrite(tensC, (tensBCD ¿¿ 2) 0x01); // C
digitalWrite(tensD, (tensBCD ¿¿ 3) 0x01); // D

// Step 6: Output units digit to 7-segment decoder


digitalWrite(unitsA, (unitsBCD ¿¿ 0) 0x01); // A
digitalWrite(unitsB, (unitsBCD ¿¿ 1) 0x01); // B
digitalWrite(unitsC, (unitsBCD ¿¿ 2) 0x01); // C
digitalWrite(unitsD, (unitsBCD ¿¿ 3) 0x01); // D

delay(100); // Short delay for stability


Figure 3.1: Circuit diagram for Addition, subtraction and multiplication

Figure 3.2: Circuit diagram for Addition, subtraction and multiplication

3.4 Conclusion:
In conclusion,the methodology used to develop the digital calculator involoves structured approach, utilisation
of specific tools to implement a user friendly applictaion.By carefully defining the requiremnts ,designing an
intutuve user interface and implementing efficient algorithms,the project succcessfully met the outlined ob-
jectives.testing elevated its reliability.This methodology provides a solid foundation for the digital calculator
project, ensuring that it meets user needs and operates efficiently. Future improvements could further enhance
functionality and performance, expanding the calculator’s capabilities based on this foundational work.This
conclusion wraps up the methodology by summarizing key choices and highlighting successful outcomes, while
also briefly acknowledging any challenges and potential improvements.
Chapter 4

Results and Discussions

4.1 Introduction
The digital calculator project successfully demonstrates the practical application of digital logic circuits. The
basic arithmetic operations—addition, subtraction, multiplication, and division—were implemented using logic
gates like AND, OR, XOR, and NOT. Testing showed that the calculator operated accurately for binary inputs,
confirming the efficiency of the design.

However, limitations such as the inability to perform complex operations or handle decimal numbers were
noted. Future improvements could include extending functionality to handle floating-point operations, adding
user interfaces, or optimizing for speed and power consumption. Overall, the project proved the viability of
digital logic systems in performing real-world tasks with high accuracy.

4.2 Conclusion
The digital calculator project successfully met its objectives by providing accurate, efficient, and user-friendly
functionality for performing basic mathematical operations. The results showed that the calculator handled a
variety of arithmetic calculations with high accuracy, and user feedback highlighted its straightforward interface
as easy to navigate. In addition to this, the multiplier and divider circuits could be expanded to allow inputs
of up to 4 bits. This was a possibility that had been discussed within the span of this project .However, this
would require a full adder integrated

8
References

1. https://forum.arduino.cc/t/adc-calculator-and-reference-sheet/1099203/3

2. https://www.studocu.com/row/document/ghulam-ishaq-khan-institute-of-engineering-sciences-and-technology/digital-
logic-design/constructing-a-binary-calculator/7152854

3. https://chatgpt.com/c/673186fd-3204-8012-b198-4cf82129c10eChatGPT

9
Chapter 5

Digital-to-Analog Converter

5.0.1 Introduction:

A DAC, (Digital-to-Analog Converter), is an essential electronic component that transforms digital signals,
typically in the form of binary data, into analog signals. A DAC is commonly found in various electronic
devices, allowing them to convert digital data into analog output that can be heard or seen. R-2R ladder DAC
is a type od DAC which uses a network of resistors arranged in a ladder-like structure, This project emphasizes
the designing and implementation of R-2R ladder DAC.

5.0.2 Working:

The R-2R ladder DAC converts a digital input into an analog output using a simple resistor network with values
RRR and 2R2R2R. Each bit in the digital input controls switches that connect either to a reference voltage or
to ground. This setup divides voltage along the ladder, creating currents that sum to an analog output

5.0.3 Methodology:

Resistors used in the building of DAC are 10K,22K. The methodology of an R-2R ladder DAC involves arranging
resistors in a ladder network with alternating values of R and 2R. Each digital input bit controls a switch that
connects either to a reference voltage (for 1) or ground (for 0). This setup divides the reference voltage
proportionally across the ladder, creating currents that sum at the output. The resulting analog voltage is
proportional to the binary input, enabling a smooth and efficient digital-to-analog conversion.

5.0.4 Operation and circuit diagram:

The R-2R ladder DAC operates by dividing voltage in a binary-weighted manner. Each bit of a digital input
controls a switch in the ladder network; if the bit is 1, the switch connects to the reference voltage, and if 0,
it connects to ground. This arrangement creates current flow through the ladder based on the binary weight
of each bit. The combined currents at the output produce an analog voltage that directly corresponds to the
digital input, allowing for seamless digital-to-analog conversion.

10
Figure 5.1: DAC CIRCUIT DIAGRAM
5.0.5 Conclusion:

The R-2R ladder DAC project successfully demonstrates the conversion of digital to analog signal in a simple
and efficient manner.
Appendix

If any content to be added as appendix of the report, it can entered in this section.

13

You might also like