Friday, 27 December 2019

Intro to computers: Analog vs digital

Intro to computers: Analog vs digital.

Computers are basically huge computational devices or calculators. Computational devices can be split into two main categories: Analog and digital.

Analog

When I grew up, most devices around me were analog and very few digital. We had records and audio cassettes, televisions with big aerials to receive the signal and dials on their face to adjust the tuning.

The way I think of analog systems is that the value is represented as a fraction. Think of this in terms of the volume of a device being 50% or a single dot on the t.v. being at 33% brightness.

In the case of the original t.v.'s, there was a beam projecting charge at the screen, and this beam moved from top to bottom, side to side at a specific speed. The amount of charge sent to that exact spot on the screen was in proportion to the amplitude of the signal. 0% would be black, 100% would be white and there was pretty much an infinite amount of fractions in between.

Electric analog devices were first made about 100 years ago, but other analog devices were in use long before that. We can think of things like sundials, clocks and mercury thermometers as analog devices.

Digital

The invention of the transistor and electric circuits changed things in a very big way.
We now have the ability to turn a signal on and off rapidly and detect its state almost instantly.
Rather than a signal being analog, with digital signals we define a voltage below a specific level as off and anything above a specific level as on.

For an arduino, anything below 1/3 VDD is off (Low) and anything above 2/3 VDD is on (High) where VDD is your supply voltage. This is often 5 volts, thus off is 0-1.67 volts and on is 3.33 -5 volts.

This allows for a far more accurate transmission than analog signals. With analog signals, any interference effected the value. With digital signals, the interference needs to be fairly high to convert an off to an on or vice-versa. This hugely increases reliability both in transmission and storage.

To clean a digital transmission, we can place a repeater along its path which receives the original signal and re-broadcasts it at base levels thus removing any interference. This is almost impossible to do with analog signals.
In addition to having a fairly large room for error, digital signals can also include Error Checking and Correcting. This allows us to detect if a digital signal was correctly received and in some cases errors can be corrected.

Analog and Digital together

Many devices are either entirely analog (although this is very rare today) and many are entirely digital e.g. your computer's CPU, keyboard and optical mouse.

There are also a large number of devices that can process both digital and analog signals. For example, the sound processing circuitry in your computer can convert an analog signal from your microphone into a digital signal using an ADC (Analog to Digital Converter) and from a digital signal to an analog one for your speakers using a DAC (Digital to Analog Converter).

Many micro controllers, including Arduino, include ADC's and/or DAC's allowing us to interface with the real world which is analog. It is trivial with an Arduino to convert analog readings like temperature or capacitance into data which can be processed digitally.

One complication with the digital world is how exactly we represent the data we are processing and storing. A whole bunch of one's and zero's are meaningless unless we have some sort of standard way of interpreting what they mean and write them out in a way that's understandable to humans.
This will be explained in Number Theory.

Thursday, 26 December 2019

Online Privacy

Question about online privacy

"What are your thoughts on embracing the digital age at the expense of personal privacy? So many actions and services linked to Facebook, cookies, etc... We leave traces to a lot of people even if we have nothing to hide. Do we embrace the internet even if it has its costs?"

My Response:

This question is probably the biggest debate about the internet deserving an entire book to adequately answer it. What i would like to do is outline the topic here and go into detail on each sub-topic over time.

The internet is the most power tool ever invented by mankind. It facilitates information creation, sharing and storage in quantities and speeds that we would not have even dreamed of a few decades ago.

The biggest problem that I see with the rapid pace of technology is that it is outpacing our ability to deal with it in a responsible way. We have given ourselves great power and freedom without thinking about its consequences and how to use it correctly.

The first issue is that people often do not protect their own privacy. They openly publish intimate details about their lives, parading in front of people they do not know.
I once commented on a picture of a female friend in her underwear, hinting that it's not appropriate to share on social media, and her reply was: That was a special moment and now you've tainted it!

I really don't understand people like that who put their personal memories on the net, expecting the audience to honor them. You need to understand that it is your responsibility to keep your information private. The very definition of publishing information is to make public what was private.

The second issue is companies that exploit us and the information they gather on us for their own profit. When the internet first gained popularity, all valuable services came with a price tag. There were either once of costs or membership subscription fees.
Today, just about everything is free.
The bad news is that there is no such thing as a free lunch. If you are not paying for something, then you are the product being sold.
If you classify a company by how it goes about making its money, then I would classify the big social media companies as surveillance firms.

Their biggest interest is in what you're going to buy next and thus show you relevant advertising because the more appropriate the advertising the bigger the revenue they get.
To know what you're going to buy next requires understanding you and your purchasing habits.
They store everything about you that they can and then use machine learning (AI) to figure out where you'll be next and what you'll buy there.

The third and biggest issue I see is about influence. We crossed the line a long time ago where we no longer just use the information we gather to predict what's going to happen next, but rather to influence what is going to happen next.

So back to the question: "Do we embrace the internet even if it has its costs?"
The first game changer for man was fire. Used correctly it could cook our food, give us light. When misused it kills.
The same thing with the internet. Would you have a large open fire in the middle of your house? Would you leave small children around a fire that has no protective barriers?

Let's embrace it, but remember that it's potentially a loaded weapon.