{"id":456,"date":"2017-04-07T18:24:13","date_gmt":"2017-04-07T22:24:13","guid":{"rendered":"http:\/\/www.circuitcrush.com\/?p=456"},"modified":"2021-06-30T21:18:32","modified_gmt":"2021-07-01T01:18:32","slug":"analog-vs-digital","status":"publish","type":"post","link":"https:\/\/www.circuitcrush.com\/analog-vs-digital\/","title":{"rendered":"Analog vs Digital: What’s the Difference?"},"content":{"rendered":"<p>There are different ways to classify electrical circuits. One very important way is to classify a circuit or system as either analog or digital but what does that mean? What’s analog vs digital?<\/p>\n<p><!--more--><\/p>\n<p>If you\u2019ve been an electronics enthusiast for a while, have taken courses in electronics or read books on the subject you probably have at least an intuitive sense of the difference between analog and digital.<\/p>\n<p>If you\u2019re new, then you may not fully understand what analog vs digital really means.<\/p>\n<p>In this post, I\u2019ll go over what each means and describe the differences.<\/p>\n<p>If you\u2019re new, hopefully you\u2019ll understand the difference between digital and analog after reading this. If you\u2019re somewhat familiar with the meanings, then hopefully this will serve as a good review.<\/p>\n<h1><strong>Analog vs Digital: Continuous and Discrete Time<\/strong><\/h1>\n<p>Let\u2019s start by defining a couple often-misunderstood terms.<\/p>\n<p>A continuous time signal is one that is specified for every infinitesimal value of time within a certain time period.<\/p>\n<p>A discrete time signal, on the other hand, is specified only at discrete time values or steps along a time line.<\/p>\n<p>Often, we confuse analog with continuous time and digital with discrete time, but they\u2019re not necessarily the same.<\/p>\n<p>An analog signal is one whose amplitude can take on any value in a continuous range.<\/p>\n<p>A digital signal\u2019s amplitude can only take on a finite number of values.<\/p>\n<p>What\u2019s all that mean?<\/p>\n<p>The image below (from the Third edition of Modern Digital and Analog Communication Systems) can help.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-458\" src=\"http:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-vs-Digital.jpg\" alt=\"Analog vs Digital\" width=\"953\" height=\"536\" srcset=\"https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-vs-Digital.jpg 953w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-vs-Digital-600x337.jpg 600w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-vs-Digital-150x84.jpg 150w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-vs-Digital-300x169.jpg 300w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-vs-Digital-768x432.jpg 768w\" sizes=\"(max-width: 953px) 100vw, 953px\" \/><\/p>\n<p>Figure (a) in the picture above shows an analog signal that is also continuous time. Figure (c) also depicts an analog signal, only now it\u2019s in discrete time. The signal itself varies continuously over the time period, but we\u2019re only sampling it at discrete points in time. If you connect the dots, you get a continuous analog signal.<\/p>\n<p>A practical example of this would be logging the temperature every 10 minutes.<\/p>\n<p>The temperature itself varies continuously over time. In other words, the temperature doesn\u2019t jump from 75 to 76 in zero time nor is there a time when there is no temperature (don’t confuse this with zero degrees!).<\/p>\n<p>Rather it takes on some value in between at every infinitesimally small time period. In this case our only interest is looking at it every 10 minutes, so if we were to plot the temperature (an analog value) it might look like part (c).<\/p>\n<p>In part (b) we see a continuous time digital signal and part (d) shows a discrete time digital signal. If you connect the dots in part (d) using only lines that are parallel or perpendicular to the t axis, something like (b) would appear.<\/p>\n<p>Part (b) resembles something you may see on an oscilloscope when probing a digital circuit.<\/p>\n<p>What about part (d)?<\/p>\n<p>If we log the value of a certain stock at the close of business every day we may have a graph that looks like part (d).<\/p>\n<h2><strong>Analog vs Digital: Analog<\/strong><\/h2>\n<p>For our intent, we\u2019ll say that in an analog system either the voltage or current will vary continuously over some time period (even though it technically doesn\u2019t have to, most things you measure do).<\/p>\n<p>An \u201canalog\u201d of something is a copy of that something. Put another way, it\u2019s analogous. That\u2019s where term analog comes from.<\/p>\n<p>Take the old fashioned microphone for example.<\/p>\n<p>Sound waves are waves of air pressure. The microphone turns those pressure waves into a fluctuating voltage or an electrical \u201canalog\u201d of the pressure waves. The signal is then amplified and fed to a speaker where the electrical signal is converted back to a pressure wave or sound.<\/p>\n<p>Unless you\u2019re part of The Matrix, you live in an analog world. Most things in nature that one can measure quantitatively appear in analog form.<\/p>\n<p>Other analog quantities (besides pressure) are distance, time, and temperature. When you listen to AM\/FM radio you are listening to information broadcast in an analog form.<\/p>\n<p>Speaking of radio, one of the problems with analog systems is the introduction of noise. We\u2019ve all tuned in a station before and heard noise or static. FM radio is more immune to noise than AM, but it still happens.<\/p>\n<p>If you\u2019re old enough, you may remember copying VHS tapes and noticing that the quality of the copy was not as good as the original. This is due to noise.<\/p>\n<p>Many of you probably know what noise looks like. If you\u2019re new or need a reminder, the picture below illustrates it. Often, noise can be much worse than what you see below.<\/p>\n<p>The AC power in your home is both continuous and analog; though spikes, sags, and transients on the line can be much worse than pictured below.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-459\" src=\"http:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-Signal-Noise.png\" alt=\"Difference between analog and digital\" width=\"480\" height=\"300\" srcset=\"https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-Signal-Noise.png 480w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-Signal-Noise-150x94.png 150w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Analog-Signal-Noise-300x188.png 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>There are even analog computers, but these are more special purpose and not something most hobbyists work with. The computers you\u2019re likely familiar with are all digital, which brings us to our next topic.<\/p>\n<h3 style=\"text-align: center;\">Become the Maker you were born to be. Try <a href=\"https:\/\/learnarduinonow.com\">Arduino Academy<\/a> for FREE!<\/h3>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-4238\" src=\"https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2.png\" alt=\"\" width=\"410\" height=\"156\" srcset=\"https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2.png 828w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2-300x114.png 300w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2-150x57.png 150w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2-768x292.png 768w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/p>\n<h2><strong>Analog vs Digital: The Digital Advantage<\/strong><\/h2>\n<p>For most of us, the digital signals we\u2019ll be working with will resemble part (b) of the figure above.<\/p>\n<p>When we think of digital, one of the first things that comes to mind is binary numbers. Some are aware of this, but many would take it as a surprise to find out that a digital signal can technically take on more than two discrete values.<\/p>\n<p>In fact, it can take on any finite number of values. These types of digital signals are referred to as <strong>M<\/strong>-ary signals with <strong>M<\/strong> representing any integer. Binary is the most common and special case where <strong>M<\/strong> = 2.<\/p>\n<p>For our purposes, we\u2019re going to assume that you\u2019ll be working with binary signals.<\/p>\n<p>One of the earliest digital electronic systems went live in 1844. Invented by Samuel Morse, the first telegraph was sent that year. This instrument used short and long pulses of current called dots and dashes.<\/p>\n<p>At any instant the key of the transmitting telegraph is one of two states: either on or off. The information that a telegraph message carries depends only on the on\/off state of the transmitter as time passes. Two different levels identify the signal at any time. This is what makes it digital.<\/p>\n<p>Of course no one uses a telegraph in this day and age but most of us use computers, smartphones, and a myriad of other digital or partly digital devices every day.<\/p>\n<p>In a binary digital system, there are only two possibilities: on or off, a.k.a. high or low.<\/p>\n<p>A high is a logic 1 and a low is a logic 0. That\u2019s why binary numbers consist of ones and zeroes.<\/p>\n<p>In TTL (Transistor-Transistor Logic) systems, we consider a high to be 5 V and a low to be 0 V. Nothing\u2019s perfect, so there is a margin for error.<\/p>\n<p>For a TTL device <em>receiving<\/em> a signal, the minimum voltage level that will be read as a high is 2 V. The maximum that will be read as a low is 0.8 V.<\/p>\n<p>Anything in between is invalid and ignored.<\/p>\n<p>The tolerances for a TTL device <em>sending<\/em> a signal are slightly different but you get the idea.<\/p>\n<p>So why is digital such a big deal?<\/p>\n<p>Consider a CD player. Most of us would agree that CD quality sound is better than vinyl records or magnetic cassette tapes, but why?<\/p>\n<p>This high sound quality is possible because the music is not stored as a physical copy of the sound waves (like a record) but as a coded series of numbers that represent amplitude steps in sound waves.<\/p>\n<p>In a record or cassette, distortion (noise) is introduced both by the analog recording process and the playback process.<\/p>\n<p>Our CD player doesn\u2019t store copies of waveforms, rather a code that tells the player how reproduce the sound every time it is played to a very high degree of accuracy.<\/p>\n<p>To make a digital copy of an analog signal (like sound) the sound waves are sampled at precise intervals. The voltage of the wave is measured at certain intervals and each measurement in converted to a number.<\/p>\n<p>This makes a digital system, like a CD player, more immune to noise. When we make an analog copy of a sound or video, noise is inherently introduced into the recording.<\/p>\n<p>I can copy an mp3 file a thousand times (by copying the copies) without losing any of the original quality. But if I try to copy a cassette tape that way, the sound quality will degrade well before I reach 1000.<\/p>\n<p>This brings us to another important advantage of digital over analog: digital information can be easily stored, transferred, and copied without distortion inherent in analog processes. Copies can be made from other copies without deterioration between copy generations.<\/p>\n<p>Try that with your VHS tapes! Analog vs digital — digital wins here.<\/p>\n<p>Volumes exist on number representation in computers and digital systems, binary arithmetic and logic, and sampling theory. These things are beyond the scope of this post, but may appear in future posts.<\/p>\n<h2><strong>The Difference Between Digital and Analog<\/strong><\/h2>\n<p>The main differences between <em>analog vs digital<\/em> should be apparent by now.<\/p>\n<p>Here\u2019s a few real-world examples to drive the point home.<\/p>\n<p>One way to compare the differences between digital and analog is to compare a single pole light switch in your home to a dimmer switch.<\/p>\n<p>With the dimmer, I can vary the brightness of the light anywhere within a defined range of values. The dimmer switch is an analog device because of this. The light can be fully on, fully off, or take on some level of brightness in between.<\/p>\n<p>With the single pole switch, the light is either fully on or fully off. There is nothing in between. Just the states of on or off. The single pole switch is a digital device because of this.<\/p>\n<p>Here\u2019s another example.<\/p>\n<p>Suppose you and a friend are standing in front of a building near the entrance. The entrance has steps and a ramp next to the steps for the physically disabled.<\/p>\n<p>For some weird reason, you and your friend start pitching quarters at the ramp and steps.<\/p>\n<p>On the ramp, a quarter can land anywhere along its length.<\/p>\n<p>However, with the steps the laws of gravity prevent the change from landing on the very edge (it will fall to the next lowest step) or on the part of the step that runs perpendicular to the ground.<\/p>\n<p>The steps represent digital, a discrete group of values and the ramp analog, a continuous group of values.<\/p>\n<h2><strong>The Difference Between Analog and Digital: Wrapping Up<\/strong><\/h2>\n<p>Hopefully you now have a good understanding of the difference between analog and digital circuits.<\/p>\n<p>I did want to get into some basics on binary number representation and digital pulse characteristics, but as usual this post has grown to be a bit long.<\/p>\n<p>A future post(s) will definitely delve a bit deeper into those topics.<\/p>\n<p>Meanwhile, comment and let me know: are you mainly an analog person, digital person, or maybe a bit of both?<\/p>\n<h2 style=\"text-align: center;\">Become the Maker you were born to be. Try <a href=\"https:\/\/learnarduinonow.com\">Arduino Academy<\/a> for FREE!<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4238\" src=\"https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2.png\" alt=\"\" width=\"828\" height=\"315\" srcset=\"https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2.png 828w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2-300x114.png 300w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2-150x57.png 150w, https:\/\/www.circuitcrush.com\/wp-content\/uploads\/FB_Cover2-768x292.png 768w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/p>\n<a target=\"_blank\" href=\"https:\/\/www.drpeterscode.com\/index.php\"><img src=\"https:\/\/www.circuitcrush.com\/wp-content\/plugins\/dpabottomofpostpage\/apixel1x1.jpg\" ><\/a><table><\/table>","protected":false},"excerpt":{"rendered":"<p>There are different ways to classify electrical circuits. One very important way is to classify a circuit or system as either analog or digital but what does that mean? What’s analog vs digital?<\/p>\n","protected":false},"author":1,"featured_media":462,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[75],"tags":[76,78,77],"class_list":{"0":"post-456","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-analog-vs-digital","8":"tag-analog","9":"tag-analog-vs-digital","10":"tag-digital","11":"entry"},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.circuitcrush.com\/wp-content\/uploads\/Difference-Between-Analog-Digital.jpg","_links":{"self":[{"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":2,"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"predecessor-version":[{"id":4343,"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/posts\/456\/revisions\/4343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/media\/462"}],"wp:attachment":[{"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.circuitcrush.com\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}