0
$\begingroup$

I once thought that any analog computer is any computer which "doesn't need electrical current to work".
I once thought that any digital computer is any computer which "does indeed need (a correctly distributed) electrical current to work".

I found out both assertions as wrong.

What are analog and digital in computer science?

$\endgroup$
5
  • 2
    $\begingroup$ And you checked what Wikipedia has to say about analog computers and digital computers? What, if anything, there would you like clarified? $\endgroup$ Sep 2, 2020 at 11:42
  • 1
    $\begingroup$ Hmm, do you understand the words "continuous" and "discrete"? $\endgroup$ Sep 2, 2020 at 12:50
  • $\begingroup$ Question broadly edited. $\endgroup$
    – George
    Sep 2, 2020 at 13:01
  • 1
    $\begingroup$ Your description of "continuous" and "discrete" is quite incorrect. This may be the source of confusion. It looks like you should first learn the general meaning of the words "analog" and "discrete", and once you understand those, it should be much easier. $\endgroup$ Sep 2, 2020 at 13:02
  • $\begingroup$ @AndrejBauer I tried to study the meaning of "analog" and failed; about discrete, I don't know in what science context (math, CS, physics, something else?). $\endgroup$
    – George
    Sep 2, 2020 at 13:05

3 Answers 3

2
$\begingroup$

I'll try to answer your remaining question: what are analog and digital in computer science?

The trouble is that these terms aren't from computer science. They are from the field called "signal processing". When someone says "analog computer", they simply mean that the computer is designed on principles of analog signal processing and built from analog components. The same goes for digital computers: they are designed with digital signal processing in mind and built from digital components.

So what does "analog" means? The word is taken from Greek word "proportional". To clarify what it means, let's look at the sum operation implemented with graduated cylinders:

Graduated cylinders

Say you want to compute $13 + 38$. First, you take an empty cylinder and fill it up to $13$ ml mark. Then you take another empty one and fill it up to $38$ ml mark. Then you pour one into the other and look how much ml of liquid is there, which you announce as the result of the sum operation.

This is "proportional", because if you want to use $26$ instead of $13$ as an input, you use double amount of liquid. Double amount of liquid means twice as large number. An electrical analog computer could use the voltage of electric current is a similar way.

Now let's take a look on a digital computation implemented with Soldier Crabs. Here's how you make logical OR:

A series of snapshots (1, 2, 3 and 4) in OR gate of swarm balls. A swarm ball located at x- and y-position consists of 40 agents, respectively. Each agent is represented by a square with its 5-steps-trajectories. Red arrows represent the direction of motion of a swarm ball.

And here's logical AND:

A series of snap shots (1, 2, 3 and 4) in AND gate of swarm balls. A swarm ball locate at x- and y-position consists of 40 agents, respectively. Each agent is represented by a square with its 5-steps-trajectories. Red arrows represent the direction of motion of a swarm ball.

You put a swarm of crabs where you want logical $1$ as an input and you leave empty places where you want logical $0$. Then you look where the swarm ball ends up and interpret it as $0$ or $1$. This is built on principles of (binary) digital processing:

  1. No crabs (no electric current, no water flow) means $0$.
  2. A swarm of crabs (5V, steady water flow) means $1$.
  3. What if you can't decide which is the case? You just say that your digital component is broken.
$\endgroup$
1
$\begingroup$

Before we had electric or electronic calculators, there were mechanical calculators. These worked with whole numbers, so they were digital, but they were powered by hand (typically by turning a crank) not by electricity.

On the other hand, in the period 1900 to 1960 there were a variety of analogue computers that were powered by electricity. Even though electronic digital computers were available from the 1950s onwards, an analogue computer was sometimes quicker, cheaper or easier to operate than an early digital computer. This wikipedia article contains pictures and descriptions of several electrical analogue computers.

$\endgroup$
1
$\begingroup$

There is a distinction between continuous phenomena and discrete. It's the former than is called analog in computer science and the latter, digital.

After all, the digits 0 and 1 are discrete.

Whilst [0,1], the interval between 0 and 1 is continuous and so analog. (I don't know if you are familiar with the notation [a,b]. It simply means all numbers between a and b).

$\endgroup$
3
  • $\begingroup$ I don't know if you are familiar with the notation [a,b]. It simply means all numbers between a and b I assume it's like regex [A-Z], right? $\endgroup$
    – George
    Sep 2, 2020 at 14:52
  • 1
    $\begingroup$ @George, well, not exactly -- it is what Mozibur Ullah wrote. $\endgroup$
    – D.W.
    Sep 2, 2020 at 16:27
  • $\begingroup$ @D.W. I guess not exactly because A-Z is much less philosophical or "open" then 0-1. $\endgroup$
    – George
    Sep 2, 2020 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.