# Calculus using digital gates.

#### Track99

Joined Jun 30, 2022
53
Hello my friends.
I fully understand how digital devices like a hand held T1-89 calculator can add 2 numbers using gates.

I want to know, how does the same calculator perform a calculus operation like differentiation or integration?

I am assuming that even calculus problems are solved using logic gates, similar to adding 2 plus 2.

How would such a calculus solving logic gate circuit look like?

I am thinking the entire project would first consist of breaking down the entire concept of calculus into easy to create logic gates.
Ty

Last edited:

#### MrChips

Joined Oct 2, 2009
29,246
You are confused by what it means to use digital gates.

A calculator uses digital gates but not in the form of the example you have shown. What you have shown is indeed that of a hardware adder circuit.

A calculator uses a 4-bit processor, much like how a microprocessor is used in a digital computer. All mathematical operations are performed on 4-bit BCD (binary coded decimal) values using mathematical algorithms.

#### drjohsmith

Joined Dec 13, 2021
792
Hello my friends.
I fully understand how digital devices like a hand held T1-89 calculator can add 2 numbers using gates.

I want to know, how does the same calculator perform a calculus operation like differentiation or integration?

I am assuming that even calculus problems are solved using logic gates, similar to adding 2 plus 2.

How would such a calculus solving logic gate circuit look like?

I am thinking the entire project would first consist of breaking down the entire concept of calculus into easy to create logic gates.
Ty

https://en.wikipedia.org/wiki/Numerical_differentiation

#### ApacheKid

Joined Jan 12, 2015
1,269
Hello my friends.
I fully understand how digital devices like a hand held T1-89 calculator can add 2 numbers using gates.

I want to know, how does the same calculator perform a calculus operation like differentiation or integration?

I am assuming that even calculus problems are solved using logic gates, similar to adding 2 plus 2.

How would such a calculus solving logic gate circuit look like?

I am thinking the entire project would first consist of breaking down the entire concept of calculus into easy to create logic gates.
Ty
If you're speaking of the algebraic process, say this kind of stuff:

well that's achieved using equation solving software, not hardware. This is software that can accept an input expression and generate an output expression.

#### Track99

Joined Jun 30, 2022
53
If you're speaking of the algebraic process, say this kind of stuff:

View attachment 293526

well that's achieved using equation solving software, not hardware. This is software that can accept an input expression and generate an output expression.
Are you saying that old school calucaltors like the TI89 used software instead of hardware based adders etc. ?

#### ApacheKid

Joined Jan 12, 2015
1,269
Are you saying that old school calucaltors like the TI89 used software instead of hardware based adders etc. ?
To perform symbolic algebra yes, algebra is based on rules just like arithmetic is based on rules, its just that the rules are different.

#### KeithWalker

Joined Jul 10, 2017
2,872
The first scientific calculator that included all the basic trigonometric functions and logarithms was the programmable Hewlett-PackardHP9100A, released in 1968, The HP-9100 series was built entirely from discrete transistor logic with no integrated circuits, and was one of the first uses of the CORDIC algorithm for trigonometric computation in a personal computing device, as well as the first calculator based on reverse Polish notation (RPN) entry.
TheHP35, introduced on February 1, 1972, was Hewlett-Packard's first pocket calculator and the world's first handheld scientific calculator Like some of HP's desktop calculators it used RPN.

#### drjohsmith

Joined Dec 13, 2021
792
Are you saying that old school calucaltors like the TI89 used software instead of hardware based adders etc. ?
Neither statement is correct.
if you think about what a computer is at its heart, is an adder and a control register
this is hardware.
but,
there is software run , in a calculator chip hard coded, called micro code, that is used to do more complex than an add.
so a subtract in a calculator was originally an invert , add 1, and then add
multiply was multiple adds, or an algorithm such as booths.

trig functions such as sin were done with a cordic type algorithm, again using the adder,

Thre is not separate hardware in the chip, ones doing add, one doing subtract, one doing multiply etc.

#### WBahn

Joined Mar 31, 2012
29,172
Are you saying that old school calucaltors like the TI89 used software instead of hardware based adders etc. ?
Yes -- and calculators much older than that.

They used a microprocessor that was specifically designed for use in calculators and those ran software (well, "firmware") code that did the computations. The computations that were done in hardware were very rudimentary and often didn't amount to much more than adding/subtracting two numbers, comparing two numbers to see which was bigger, and some basic bitwise logic operations.

If you want to get a feel for how this is done, look into the Nand-2-Tetris project. There you will build an entire computer (well, pretty much) with nothing but NAND gates and D-type flip flops (in simulation) and you will write all of the software to take a high-level object-oriented language (albeit very minimalistic) and compile it into code that can run on that hardware. Part of that is writing basic math routines.

#### ApacheKid

Joined Jan 12, 2015
1,269
It's important to grasp that arithmetic and algebra are distinct disciplines, they are each based on rules but different kinds of rules.

Any arithmetic computation can be reduced to addition and subtraction, this is true for any arithmetic computation that operates on numeric values, including square roots, trig, logs etc., all of these operations can be performed using only addition and subtraction.