<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5327588755518362492</atom:id><lastBuildDate>Sat, 05 Oct 2024 02:00:01 +0000</lastBuildDate><category>Digital Electronics</category><category>ATmega16</category><category>Binary Algebra</category><category>Encoding</category><category>Logic Gates</category><category>Microcontrollers</category><category>Number system</category><category>Quantization</category><category>Sampling</category><category>USBasp</category><category>binary</category><category>decimal</category><category>hexadecimal</category><category>octal</category><category>problems</category><category>ternary</category><title>Appreciating Electronics</title><description></description><link>http://kaushanim.blogspot.com/</link><managingEditor>noreply@blogger.com (Unknown)</managingEditor><generator>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5327588755518362492.post-4562992556941314234</guid><pubDate>Sat, 01 Nov 2014 23:31:00 +0000</pubDate><atom:updated>2014-11-02T05:36:24.353+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">binary</category><category domain="http://www.blogger.com/atom/ns#">decimal</category><category domain="http://www.blogger.com/atom/ns#">hexadecimal</category><category domain="http://www.blogger.com/atom/ns#">Number system</category><category domain="http://www.blogger.com/atom/ns#">octal</category><category domain="http://www.blogger.com/atom/ns#">ternary</category><title>Number Systems</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Before we delve further into designing digital systems, I think it is important to know a little more about another very basic concept - that of different number systems used in the digital world. All our design methods later on will depend on these number systems, especially one in particular - the binary system.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Let&#39;s start with the number system we are most familiar with. It is called the decimal system, since it is based on powers of ten. Why did the decimal system become so popular amongst us humans? Some say that is because we have ten digits on our hands, and hence prefer to count in multiples of ten. Well, that is at least how the decimal system started. So, let&#39;s take a deeper look into the system. The system is based on 10 numbers, or &lt;b&gt;&quot;digits&quot;&lt;/b&gt;, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} = {0 to (10-1)}. Any number you want to express in this system, can be written as a combination of these ten digits and a power of 10. Eg.,&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
\(\begin{equation}
173=1*10^{2}+7*10^{1}+3*10^{0}
\end{equation}\)&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
And so can any other number be decomposed. Here, the number &lt;b&gt;10&lt;/b&gt; is called the &lt;b&gt;&quot;base&quot;&lt;/b&gt; or &lt;b&gt;&quot;radix&quot;&lt;/b&gt; (Latin for &quot;root&quot;) of the number system.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Let us now take any general number system, with a radix, say, N, where N is an integer. Such a number system will consist of N digits, viz., \( \{0, 1, 2, ... , N-1\} \). (In case of decimal systems, N = 10, and so the digits are \( \{0, 1, 2, ... , 9\} \)). Any number in that system can be expressed as,&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
\(\begin{equation}&amp;nbsp;(xyz)_{N}=x*N^{2}+y*N^{1}+z*N^{0} \end{equation}\)&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
where \(&amp;nbsp;x,y,z\in\{1,2,...,N-1\} \). The right side of the above equation evaluates to the value of the number in the decimal system. The left hand side is the value of the number in the base-N numbering system, as is denoted by the subscript_N.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Now equipped with these terms, we are beginning to get an idea of what these number systems are all about. Well, from a bird&#39;s eye view, they appeared really complicated, didn&#39;t they? I mean, what are binary, ternary, hexadecimal systems all about! Even their names are so complicated! But now that we know how these systems work, they don&#39;t seem so formidable after all.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
So, how does the binary system work? Binary means the system has only two digits, \( \{0,1\} \). Hence its radix is? That&#39;s right, 2. So, say I give you a binary number \( (11001011)_{2} \), what is the number in decimal?&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
$$&amp;nbsp;(11001011)_{2}=1*2^{0}+1*2^{1}+0*2^{2}+1*2^{3}+0*2^{4}+0*2^{5}+1*2^{6}+1*2^{7} $$&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
$$=1+2+0+8+0+0+64+128=(203)_{10} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Till now we have understood what the number systems mean and what any number in any number system is in the decimal system. Now, let us divert our attention to another important aspect - how to convert from the decimal number system to any other number system. Since we multiplied each digit of the number by its radix_to_some_power and added them all up to get the decimal number, it seems logical that while converting back to radix_N, we should divide the decimal number by the radix and take the remainder at each stage. Let us try and see this more mathematically. As we saw in the previous example,&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ (203)_{10}=1+2+0+8+0+0+64+128 $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ =1*2^{0}+1*2^{1}+0*2^{2}+1*2^{3}+0*2^{4}+0*2^{5}+1*2^{6}+1*2^{7} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ \Longrightarrow(203)_{10}/2=\frac{1}{2}(1*2^{0}+1*2^{1}+0*2^{2}+1*2^{3}+0*2^{4}+0*2^{5}+1*2^{6}+1*2^{7}) $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
which leaves a remainder $ 1 $ and a quotient $ 1*2^{0}+0*2^{1}+1*2^{2}+0*2^{3}+0*2^{4}+1*2^{5}+1*2^{6} $. Thus, we get the &lt;b&gt;LSB (Least Significant Bit)&lt;/b&gt; or the right-most digit of the binary number. If we continue this process with the quotient obtained, we&#39;ll get the next right-most digit, and so on, until the quotient becomes 0 and we get the &lt;b&gt;MSB (Most Significant Bit)&lt;/b&gt; as the remainder.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
That&#39;s a pretty easy procedure to follow! &lt;b&gt;Just be very careful that you get back the digits in the reverse order&lt;/b&gt;. But some of you may wonder why do we have to remember two different processes from converting from decimal to base N and vice-versa. Shouldn&#39;t there be a single process that covers both? Turns out, you can apply a similar process, only complication being that the numbers now have to be all represented in radix N. Let&#39;s see in the next example what this means:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ (203)_{10} = 2*10^{2}+0*10^{1}+3*10^{0} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ = (10)_{2}*(1010)_{2}^{2}+0*(1010)_{2}^{1}+(11)_{2}*(1010)_{2}^{0} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
where we have represented all decimal numbers as their binary equivalents. Thus $2_{10}=10_{2}$, $3_{10}=11_{2}$ and $10_{10}=1010_{2}$. As you can see, this makes the whole process very complicated and defeats the entire purpose, as now you are supposed to know the binary values of all these decimal numbers, and then you are also supposed to be good at binary multiplications! And even if you manage to do that, imagine what happens when we change the radix!&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The only purpose this entire procedure serves is that now we know how to convert from any base to any other base; not just to and from base 10. Say we want to convert the number $122_{3}$ to its binary equivalent. We can straightaway proceed as follows:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ (122)_{3}=1*3^{2}+2*3^{1}+2*3^{0} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ =1*(11)_{2}^{2}+(10)_{2}*(11)_{2}^{1}+(10)_{2}*(11)_{2}^{0} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ =1*(11)_{2}*(11)_{2}+(110)_{2}+(10)_{2} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ =(1001)_{2}+(110)_{2}+(10)_{2} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
$$ =(10001)_{2} $$&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
The result can be verified readily by converting each of the representations to the corresponding decimal value. This I am leaving as an exercise you can try yourselves.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
We have thus seen some of the bases in which we can represent numbers - binary (base 2), ternary (base 3), and decimal (base 10). Some of the other important radices (plural of radix) are 8 (octal number system) and 16 (hexadecimal number system). These systems are used extensively in computer programming and digital system design since they can represent binary numbers in more compressed formats (please note that 8 and 16 are powers of two after all - can you explain why this fact helps?). One thing to note in hexadecimal systems is how the digits are represented (sadly we have only 10 digits due to the shortage of fingers (digits) in our hands (the ancients should have considered the 10 toes as well when counting!)). The hexadecimal digits are $ \{0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F\} $. The last six digits are represented (sadly, in need of a better choice) as the first 6 alphabets in the English language.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
So, start playing around with the number systems. Till the next time.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://kaushanim.blogspot.com/2014/11/number-systems.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5327588755518362492.post-5172326291558309330</guid><pubDate>Sat, 21 Aug 2010 18:16:00 +0000</pubDate><atom:updated>2010-08-22T01:51:17.132+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Digital Electronics</category><category domain="http://www.blogger.com/atom/ns#">problems</category><title>Digital Circuit Design Problem #1</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;Hi everybody. Well, first of all, I would like to apologize for the long delay in this post. Actually, I&#39;ve been a bit busy over the past few months. Anyways, here I am again, continuing forward on our digital path.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now that we know the basic gates and some of their properties, we would like to build some circuits using these gates. Let us get our hands dirty then. Let&#39;s try one. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well, here is a problem statement:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You have an automatic lock in your home. It has a 8-bit key set into it, which can be set&amp;nbsp; as and when required from inside the house. There is a 8-bit keypad outside the door. Only if you type in the right key, the door will open. You have to design this lock.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Before going to find the solution, I would strongly suggest that you download &lt;a href=&quot;http://ozark.hendrix.edu/%7Eburch/logisim/download.html&quot;&gt;this&lt;/a&gt; jar software and try to simulate the solution on this first. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Solution:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Before looking at the solution, please put your brain cells to some work. Fire them up and try to analyze the problem. Try to find a solution yourself. If it becomes impossible or difficult, then move onto the solution I&#39;m providing here. Also, your solution may be different from what I&#39;m proposing here. Please post your solution too for the benefit of others.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;So, how to proceed? Let&#39;s say the key set into the lock is 10010010. So, when we set the same key in the keypad, only then the door will open. That means each of the bits have to be matched to the corresponding bit of the key set. Now, is there any gate we&#39;ve studied so far that does this trick of comparing? Let&#39;s take a look again at the truth tables of the gates. Do you find any such gate that gives a logic &#39;1&#39; only when both the inputs match?&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;On taking a close look, we find that &lt;b&gt;EXNOR&lt;/b&gt; gate does exactly that.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSb7GouOei578s3TWj_4VR2K6O2c9wVDBpD-seS8GWrMcbGLnU3sU3gv7xr10tvdg7MC3e3aefyUKyzJmG_vwdJtwNtongRLbR3RC0MrZIDv3MTrkEh42QTOBT0Ld4fKzNeuyAOZungbM/s1600/04119.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSb7GouOei578s3TWj_4VR2K6O2c9wVDBpD-seS8GWrMcbGLnU3sU3gv7xr10tvdg7MC3e3aefyUKyzJmG_vwdJtwNtongRLbR3RC0MrZIDv3MTrkEh42QTOBT0Ld4fKzNeuyAOZungbM/s320/04119.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;So, now all we need to do is put one exnor gate between every bit of the keypad and the corresponding bit of set key. But does this solve the problem? Let&#39;s say we have typed in the right key. So that every EXNOR gate gives a logic &#39;1&#39;. We have 8 exnor gates giving a logic &#39;1&#39; at its output. So, which do I connect to the lock to open it? The answer should be all of them. But then the lock will open on only one signal. So, what do we do now? Now, let&#39;s think a bit more. What if there was a gate that would give &#39;1&#39; as an output only if all of its inputs are &#39;1&#39;? That is, a &#39;1&#39; is obtained only when all the bits of the keypad match with those of the key. And voila, we find such a gate yet again. It&#39;s an AND gate. Now I&#39;m loving these gates. They do exactly what we want them to do, don&#39;t they?&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9BBvz3s3JU20J2DZwwqC17kr9p4fLj1GkPdGdSqZYjNb9_YOuGSRu5SuHn2-VzztC-UFcuLx1V9i_1RbZPPSd4-R9vwz99SOcdE_TQrjT9xtbSeZKfcdYPtgDf6dpCUE-qr6qYGX8pRE/s1600/04101.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9BBvz3s3JU20J2DZwwqC17kr9p4fLj1GkPdGdSqZYjNb9_YOuGSRu5SuHn2-VzztC-UFcuLx1V9i_1RbZPPSd4-R9vwz99SOcdE_TQrjT9xtbSeZKfcdYPtgDf6dpCUE-qr6qYGX8pRE/s320/04101.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We can use a 8 input AND gate here. We connect the outputs of all the EXNOR gates to this AND gate, and the output we connect to the lock. The final circuit would look somewhat like this.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4kCtfIWGcfFJO2eLBhqq5JKchSxwbgdeb3_hyfzIKjwhQv_AZM2svCaD76DFR8imNUhZTFjye0yXuzmwgJvGtROPqk_B96fL96q-iZKc4RyxfXEvmhEpZS4iBk0JpsOrVYIfM1ILmXGg/s1600/autokey.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4kCtfIWGcfFJO2eLBhqq5JKchSxwbgdeb3_hyfzIKjwhQv_AZM2svCaD76DFR8imNUhZTFjye0yXuzmwgJvGtROPqk_B96fL96q-iZKc4RyxfXEvmhEpZS4iBk0JpsOrVYIfM1ILmXGg/s320/autokey.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The circuit I&#39;ve shown here has been simulated on &lt;a href=&quot;http://ozark.hendrix.edu/%7Eburch/logisim/&quot;&gt;Logisim&lt;/a&gt;. Do try out your circuits on this software.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We&#39;ll try out other circuits in upcoming posts. In the meantime, try out your designs and try to find out other digital circuit problems. And most important, don&#39;t forget to post your comments/suggestions.&lt;/div&gt;</description><link>http://kaushanim.blogspot.com/2010/08/hi-everybody.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSb7GouOei578s3TWj_4VR2K6O2c9wVDBpD-seS8GWrMcbGLnU3sU3gv7xr10tvdg7MC3e3aefyUKyzJmG_vwdJtwNtongRLbR3RC0MrZIDv3MTrkEh42QTOBT0Ld4fKzNeuyAOZungbM/s72-c/04119.png" height="72" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5327588755518362492.post-821806437025510605</guid><pubDate>Sun, 04 Apr 2010 19:35:00 +0000</pubDate><atom:updated>2010-04-05T01:54:05.024+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Binary Algebra</category><category domain="http://www.blogger.com/atom/ns#">Digital Electronics</category><category domain="http://www.blogger.com/atom/ns#">Logic Gates</category><title>A Walk through the Gates</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;So now that we have digital signals, what to do with them? Obviously, we would definitely like to build some circuits that can use these signals. We said that computers use digital signals. Wouldn&#39;t it be great if we could make one, or at least design it?&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We will move on to that. But before that, we need to know what digital circuits are made of. If we look into any analog circuit, the basic building blocks are resistors, capacitors and inductors. Similarly, in digital domain, we have what are called as &quot;Logic Gates&quot;. Gates? What are these , now? Well, they are simply &#39;gates&#39;. What does a normal gate do in our daily life? It lets you pass. Or, it may stop you. Similarly, for logic gates. They either let a signal pass, or they stop a signal. Why called &lt;i&gt;logic&lt;/i&gt; gates? Because they work on simple logic. Consider an AND gate. Now, when we say Rahul &lt;i&gt;and&lt;/i&gt; Arun, it means both of them. Similarly, an AND gate gives an output only if &lt;i&gt;both&lt;/i&gt; the signals at its input are present.Now can you explain what an OR gate does? Write a comment to explain.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Before going into more details about logic gates, we need to know what is known as Boolean algebra. It is named after George Boole(1815-1864), an English mathematician, who invented it. We said before that digital circuits use only 0&#39;s and 1&#39;s as its signals. 0 repesents an off signal, a false logic. 1 represents an on signal, or a true logic. Based on these two logical levels, the algebra which has been developed is called Boolean algebra. Since we use only two numbers to represent this system (viz., 0 and 1), it is also called as binary algebra, and the numbers formed using this system are called binary numbers.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In Boolean algebra, we define a few operations, as follows:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;AND:&lt;/b&gt; If &#39;a&#39; and &#39;b&#39; are the inputs, then the output is 1 only if both a and b are 1, otherwise the output is 0. Symbolically, this is represented as &lt;b&gt;a.b&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNr3xmganhxkEGAxQutv-SXTIADSbQVy9tmaGKOlIMrgPRSFv1ZChHG4_3rkdgI62Gi_wfjqUgpSlffKdR_NAE_ESQw_h-0ZAiODoPNb9HnnWiJSkDYhJoUp_jJxfqdMKu436YKKPecz4/s1600/04101.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNr3xmganhxkEGAxQutv-SXTIADSbQVy9tmaGKOlIMrgPRSFv1ZChHG4_3rkdgI62Gi_wfjqUgpSlffKdR_NAE_ESQw_h-0ZAiODoPNb9HnnWiJSkDYhJoUp_jJxfqdMKu436YKKPecz4/s320/04101.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;OR:&lt;/b&gt; If &#39;a&#39; and &#39;b&#39; are the inputs, then the output is 1 if either a or b is 1., otherwise the output is 0.Symbolically, this is represented as &lt;b&gt;a+b&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvUdq3ghhjKm3MW6edZflfvhLKhPSdScr9w6vTii7RImKuPEXPNVOpodVOL2i-DfArnCGISC7vBLlSAlPfKHA8fGmbVwiYCsyeuaFMHpz5to6svN1XJvmv668V866fMN0RE6d7gdGuY7I/s1600/04108.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvUdq3ghhjKm3MW6edZflfvhLKhPSdScr9w6vTii7RImKuPEXPNVOpodVOL2i-DfArnCGISC7vBLlSAlPfKHA8fGmbVwiYCsyeuaFMHpz5to6svN1XJvmv668V866fMN0RE6d7gdGuY7I/s320/04108.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;NOT:&lt;/b&gt; If &#39;a&#39; is the input, then the output is 1 if a is 0, otherwise the output is 0. Symbolically, this is written as &lt;b&gt;~a&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcnfqHLPL5O7oNqLhtCv9IOBOIyP3C3LqY18GeErcvPCC0Oc1sgQtH1F82HKK348kcyge65FWlnJAWUyR7rqgLMRWsJMGN2JXLYaIuSXOguuOI0go13bE_GAIoeDzAoJmInytfXaZmZlA/s1600/14003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcnfqHLPL5O7oNqLhtCv9IOBOIyP3C3LqY18GeErcvPCC0Oc1sgQtH1F82HKK348kcyge65FWlnJAWUyR7rqgLMRWsJMGN2JXLYaIuSXOguuOI0go13bE_GAIoeDzAoJmInytfXaZmZlA/s200/14003.png&quot; width=&quot;183&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;NAND:&lt;/b&gt; If &#39;a&#39; and &#39;b&#39; are the inputs, then the output is 0 only if both a and b are 1, otherwise the output is 1. Symbolically, this is represented as &lt;b&gt;~(a.b)&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLQXa9IPyA7Z7GbahqK7b2WfgBURoZDSytxRXoDhwDOmZb7WpR8sEFCQqWPrqE9rmodzBJm1oSfQyDoNYl77Mnehx5rkogIYn7AuWG28UhHqZ9BDDHuTFSw3byutGgeBOEqhSyUvQlZJs/s1600/04106.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLQXa9IPyA7Z7GbahqK7b2WfgBURoZDSytxRXoDhwDOmZb7WpR8sEFCQqWPrqE9rmodzBJm1oSfQyDoNYl77Mnehx5rkogIYn7AuWG28UhHqZ9BDDHuTFSw3byutGgeBOEqhSyUvQlZJs/s320/04106.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;NOR:&lt;/b&gt;&amp;nbsp; If &#39;a&#39; and &#39;b&#39; are the inputs, then the output is 0 if either a or b is 1., otherwise the output is 1.Symbolically, this is represented as &lt;b&gt;~(a+b)&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQpJ3eTmxtxZ4FoHR9P6ptGElZtutsVT0Le9XFaseDu8yFeyT9-0AoFY4AaqMn5O2pbLoaf2w5KL8D4sHJiiHVq7wZf32QwlsOdQUBklE9zeozM8940vR4Lff0hLIch9Bcf1w2k_4EVCo/s1600/04113.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQpJ3eTmxtxZ4FoHR9P6ptGElZtutsVT0Le9XFaseDu8yFeyT9-0AoFY4AaqMn5O2pbLoaf2w5KL8D4sHJiiHVq7wZf32QwlsOdQUBklE9zeozM8940vR4Lff0hLIch9Bcf1w2k_4EVCo/s320/04113.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;XOR:&lt;/b&gt;&amp;nbsp; If &#39;a&#39; and &#39;b&#39; are the inputs, then the output is 1 only if a and b are unequal, otherwise the output is 0.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaMzb8hueyzKGwOrtNbjma3Mj2eCPrzjiQQ54UNQDONOEHlv08uICyIucoioXK3FVESyuKdyck7GwXNFMETdSQx-AQTVR3pWSc9Db7i_h8E6x0IEsVN0S5D4VTSPhqq7uPKV1R7QPhOj0/s1600/04116.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaMzb8hueyzKGwOrtNbjma3Mj2eCPrzjiQQ54UNQDONOEHlv08uICyIucoioXK3FVESyuKdyck7GwXNFMETdSQx-AQTVR3pWSc9Db7i_h8E6x0IEsVN0S5D4VTSPhqq7uPKV1R7QPhOj0/s320/04116.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;XNOR:&lt;/b&gt;&amp;nbsp; If &#39;a&#39; and &#39;b&#39; are the inputs, then the output is 1 only if a and b are both equal, otherwise the output is 0.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZRi2rlD-zYh5O4cLuXLSYbV0_d5mQfgWPnuwV-cluGlnzzI3x9wFc7fomWHmgzHuipeps8SnN7yKtKzdyjL6jis2O9Q0U696dhWF4YJ1ekE8k4JIwK5bJml6av90MJjKWZwdLo0U8Zz8/s1600/04119.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZRi2rlD-zYh5O4cLuXLSYbV0_d5mQfgWPnuwV-cluGlnzzI3x9wFc7fomWHmgzHuipeps8SnN7yKtKzdyjL6jis2O9Q0U696dhWF4YJ1ekE8k4JIwK5bJml6av90MJjKWZwdLo0U8Zz8/s320/04119.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
These are the basic gates we use to implement any digital circuit. These logic gates are available in the market in the form of integrated circuits (ICs). We shall talk about that later on. Now let us focus on basic operations on binary digits, ie., 0 and 1.&lt;br /&gt;
&lt;br /&gt;
The basic operations that can be done on binary digits are OR, AND &amp;amp; NOT. All other operations are combination of these three operations. For example, XOR can be obtained from these basic operations as follows:&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;a xor b = a.(~b)+(~a).b&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Just try the above equation with all possible values of &lt;b&gt;a &lt;/b&gt;and &lt;b&gt;b&lt;/b&gt;, and you will know the justification of the same.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In order to make these basic operations, viz. AND, OR and NOT simpler, we have to go through some basic properties related to these operations. Let us look through these one by one:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Identity Property:&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;a + 0 = a&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.1 = a&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Zero Property:&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;a.0 = 0&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;a.(~a) = 0&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Unity Property:&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/b&gt;a +1 = 1&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;a + (~a) = 1&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt; Commutative Property:&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; a + b = b + a&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;a.b = b.a&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Associative Property:&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; a + (b + c) = (a + b) + c&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.(b.c) = (a.b).c&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Distributive Property:&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; a.(b + c) = (a.b) + (a.c)&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;a + (b.c) = (a + b).(a + c)&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;De Morgan&#39;s Law:&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;/b&gt;~(a + b) = (~a).(~b)&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;~(a.b) = (~a) + (~b)&lt;br /&gt;
&lt;b&gt;In all the above examples, a,b,c are binary digits.&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Thus, keeping these properties in mind, we can go forward on our journey into the digital world. In fact, we have come quite far into the world of digital electronics. We have now known how the digital or binary data operate on each other. We have seen what logic gates are. The next problem would be how to use all these to implement a digital circuit. For this purpose, we will consider some real world problems and try to find out their solutions using the knowledge we have gained so far. But for that, we have to wait till my next post. Till then, keep your brain cells busy by solving a few questions.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Try to reduce the following Boolean expressions into the simplest form possible:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;a) (a+b+c).(a.b+a.c).(~(a+b))&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;b) ((~a).b.(~c)) + (a.(~b).(~c)) + ((~a).(~b).(~c))&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;c) ~(a.b.c + (~a).b.c + a.(~b).c + a.b.(~c))&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Note: While solving, you can use another notation for (~a) denoted as follows:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSW1XmJu5sKByFyiL8BpLCwh0jV5JULidsKDCJyETFKkWM7HyxctEfWn-PpjN11fHDFldBUZ1ZSyUatIVN_qh4m8vG-XSNe7022TCbMWfOnK6kmJSKyf5EIvu0pUajHOsQsXhI3OsZySk/s1600/a+bar.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSW1XmJu5sKByFyiL8BpLCwh0jV5JULidsKDCJyETFKkWM7HyxctEfWn-PpjN11fHDFldBUZ1ZSyUatIVN_qh4m8vG-XSNe7022TCbMWfOnK6kmJSKyf5EIvu0pUajHOsQsXhI3OsZySk/s320/a+bar.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Well, any comment will be highly appreciated. So please don&#39;t forget to leave a comment before you leave the page. And don&#39;t forget to express your reactions below. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;</description><link>http://kaushanim.blogspot.com/2010/04/walk-through-gates.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNr3xmganhxkEGAxQutv-SXTIADSbQVy9tmaGKOlIMrgPRSFv1ZChHG4_3rkdgI62Gi_wfjqUgpSlffKdR_NAE_ESQw_h-0ZAiODoPNb9HnnWiJSkDYhJoUp_jJxfqdMKu436YKKPecz4/s72-c/04101.png" height="72" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5327588755518362492.post-4993657207086742448</guid><pubDate>Tue, 23 Feb 2010 09:55:00 +0000</pubDate><atom:updated>2010-03-23T23:34:10.160+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Digital Electronics</category><category domain="http://www.blogger.com/atom/ns#">Encoding</category><category domain="http://www.blogger.com/atom/ns#">Quantization</category><category domain="http://www.blogger.com/atom/ns#">Sampling</category><title>Sampling, Quantization &amp; Encoding</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;Since we have discussed on what digital signals are, the next question that obviously comes up is how do we generate a digital signal? Digital signals can be generated from analog signals by the means of 3 basic steps:&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;Sampling&lt;/li&gt;
&lt;li&gt;Quantization&lt;/li&gt;
&lt;li&gt;Encoding&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We will take a look at each of these steps one by one.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;What should be the first step in getting a digital signal? You need to discretize the analog signal in time. This process is called the process of &lt;b&gt;sampling&lt;/b&gt;. For the purpose of sampling, the analog signal values are measured at discrete intervals of time, say at an interval of 1 second each. Physically this can be done with the help of a simple circuit that uses a switch. The switch is on for a very small amount of time at an interval of one second. Thus, the analog signal passes through the switch during this small amount of time only, when the switch is on. Hence we approximately get the amplitude of the analog signal at these discrete periods of time.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Theoretically, this is represented as multiplying the analog signal by a train of impulses. An impulse is a signal that has some value only during the present time instant, ie, at time t = 0, but is zero elsewhere.A train of impulses are impulse signals occurring periodically over time. The train of impulses can thus be represented by the following diagram.&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAZ1Gy_Q2dmPpJC33gsb0X1djEfAa0MprWbA4TGRN0vkaVUzVQH1fBPDthjhUWy7wD9ys75iwkLsLCf1R4k3iKuLSbzCl1OB5Jdq3ZQwbjM_Z7t_8IiYN8E0pKmbR3K_rIjIhM_ARHY8/s1600-h/impulse_train.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAZ1Gy_Q2dmPpJC33gsb0X1djEfAa0MprWbA4TGRN0vkaVUzVQH1fBPDthjhUWy7wD9ys75iwkLsLCf1R4k3iKuLSbzCl1OB5Jdq3ZQwbjM_Z7t_8IiYN8E0pKmbR3K_rIjIhM_ARHY8/s320/impulse_train.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Thus, on applying the following input to the sampling circuit, the output is obtained as:&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrD-sZrJJXaKTRsK9Kl6VRP4CO2FnTxI7dOMEGPhim378g-q4J2jw95wk0oapMNgVmIdGDjdYkNztzUqb8w0TLzMVmuzMsw8JJvgFScrCIsoZ7bsUfShWVEvK6YWWn-MMjWa9PrAU372w/s1600-h/analog.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrD-sZrJJXaKTRsK9Kl6VRP4CO2FnTxI7dOMEGPhim378g-q4J2jw95wk0oapMNgVmIdGDjdYkNztzUqb8w0TLzMVmuzMsw8JJvgFScrCIsoZ7bsUfShWVEvK6YWWn-MMjWa9PrAU372w/s320/analog.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8g95ij14xEWMJp9qiak4dLK0yjMas1yLh0gKOtwXHzDkLjQXtXnUFZ5HWTJq1LmdOXU-uQ6MmPmzEOfkGWxyrwFVmJIp6tPMZRVMuIEhZZIDvKRUrrK064DKyf0c62x6Ewk8MaMFe7nI/s1600-h/discrete.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8g95ij14xEWMJp9qiak4dLK0yjMas1yLh0gKOtwXHzDkLjQXtXnUFZ5HWTJq1LmdOXU-uQ6MmPmzEOfkGWxyrwFVmJIp6tPMZRVMuIEhZZIDvKRUrrK064DKyf0c62x6Ewk8MaMFe7nI/s320/discrete.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once a signal is sampled, it is called a discrete signal. The next step towards digitization is &lt;b&gt;Quantization&lt;/b&gt;. In this step, we do what is left for a signal to be called as digital, that is, amplitude discretization. We divide the amplitude into discrete levels. Usually the number of levels is a power of 2. This is done for easier binary representation. This will be further illustrated when we look into encoding. The resulting signal looks like this:&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxUMoLrRZMeucMZubmGgk44AhlOQoZ76Z4chOs_LFjfZlikfrKEgpGAAMERpX5nQ8cJM7Uamtf7x58sxo1wvCMmWRrmwQAtC_1rh9rbvXWFKbP7S018VQBQWrW0UcxFEV2eFePsKG9wLs/s1600-h/digital.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxUMoLrRZMeucMZubmGgk44AhlOQoZ76Z4chOs_LFjfZlikfrKEgpGAAMERpX5nQ8cJM7Uamtf7x58sxo1wvCMmWRrmwQAtC_1rh9rbvXWFKbP7S018VQBQWrW0UcxFEV2eFePsKG9wLs/s320/digital.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&amp;nbsp;Here, discretization of amplitude has been done with unit amplitude as the step.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;The resulting signal is a digital signal. However, the digital systems we generally use, have binary representations only, that is, they can understand only two states, zero or one, or on or off. This is due to the fact that they are implemented using switches, namely, transistors, which can be either switched on or off. For this reason, the number of levels we have divided the amplitude into, have to be encoded in binary. This process is known as &lt;b&gt;Encoding&lt;/b&gt;. Here we find the use of taking 2^n levels in amplitude. Any radix 2 number (having number of values equal to 2^n),&amp;nbsp; can be encoded into binary using n-bits, where each bit represents either zero or one. Any value within this 2^n can then be represented by an n-bit number. This can be demonstrated by a simple example.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Let us consider that we divide the amplitude into 8 equal levels. Now we know,&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;8&amp;nbsp; = 2^3&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Thus, according to the previous argument, the number of bits required to represent any of these levels is 3. This is shown as follows:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Level 0 = 000 binary&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;1 = 001&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;2 = 010&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;3 = 011&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;4 = 100&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;5 = 101&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;6 = 110&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;7 = 111&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Thus, we get 8 levels, from level 0 to level 7, which can be represented by 3-bit binary numbers. It is to be noted that the levels are numbered from 0 to 7, thus making a total of 8 levels.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;For the digital signal we have generated, the encoded signal is as follows. We need 4-bits for encoding here, as 2^4 = 16:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigwej8Yv7aHk_2riDA2C_fhVjog7DviJjoxMb9jQjpMLAwBdm4o_gEEy7w9-OzCypC1GHoutC_Eh7ILv8i1y_CGxyNF8MUrycn4GQMAfD3CWRvlFRUcUj_El5IZcx_lGlpcsKv2efnlX8/s1600-h/encoded_signal.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigwej8Yv7aHk_2riDA2C_fhVjog7DviJjoxMb9jQjpMLAwBdm4o_gEEy7w9-OzCypC1GHoutC_Eh7ILv8i1y_CGxyNF8MUrycn4GQMAfD3CWRvlFRUcUj_El5IZcx_lGlpcsKv2efnlX8/s320/encoded_signal.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;The process of encoding provides us with the required digital signal, which can be transmitted over any transmission medium and can also be used by digital systems for different purposes.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We will try to explore the world of digital further in the up-coming posts. And as we move on, we&#39;ll try to focus on the practical aspect of designing a digital circuit. But before that, I must keep my promise. Here is the solution to the question that I asked:&lt;span style=&quot;color: #999999; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;span style=&quot;color: #999999; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Why do we need a usb programmer rather than serial programmer on laptops?&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well, the answer is simply because laptops do not have a serial port for communication. Hence we are obliged to use a usb port and hence a usb programmer.&lt;/div&gt;</description><link>http://kaushanim.blogspot.com/2010/03/sampling-quantization-encoding.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAZ1Gy_Q2dmPpJC33gsb0X1djEfAa0MprWbA4TGRN0vkaVUzVQH1fBPDthjhUWy7wD9ys75iwkLsLCf1R4k3iKuLSbzCl1OB5Jdq3ZQwbjM_Z7t_8IiYN8E0pKmbR3K_rIjIhM_ARHY8/s72-c/impulse_train.jpg" height="72" width="72"/><thr:total>9</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5327588755518362492.post-3439742854657593477</guid><pubDate>Fri, 19 Feb 2010 17:00:00 +0000</pubDate><atom:updated>2010-03-23T22:53:35.813+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Digital Electronics</category><title>An Introduction to Digital Electronics</title><description>Ever wondered what the term digital really means? Literally, digital means &#39;relating to digits or fingers&#39;. In other words, something that is countable. The signals we come across in nature are continuous in nature. By continuous I mean that they vary continuously in both time and amplitude. For example, take the case of your voice signal. As you speak, it produces a continuous variation, maybe in its amplitude or frequency with respect to time. Such signals are called &lt;i&gt;analog signals&lt;/i&gt;. The following is an example of a typical analog signal.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfCEDf9W7QO_n3Y22pYONcSdE9crhQO6Sh9gW0MnB6yJp_PNGxBbeoDcQhdXN0jlsd6cRAih3tWLb8dPUz39FFvdopqbR_o3kUPCA3ZHWNsyuKgyXl9zzzLix34GiLYaGAUi-Xvbb-B30/s1600-h/analog.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfCEDf9W7QO_n3Y22pYONcSdE9crhQO6Sh9gW0MnB6yJp_PNGxBbeoDcQhdXN0jlsd6cRAih3tWLb8dPUz39FFvdopqbR_o3kUPCA3ZHWNsyuKgyXl9zzzLix34GiLYaGAUi-Xvbb-B30/s320/analog.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Do you think this signal is countable? Yes, maybe in terms of peak amplitude or frequency, but will you be able to measure &lt;i&gt;accurately&lt;/i&gt; the amplitude of the signal at any given time? Even the variation in time is infinitesimally small, which is not possible to measure or count. As a result, we get infinite number of&amp;nbsp; amplitude levels possible and infinite number of time durations. Thus, the signal is not countable.&lt;br /&gt;
&lt;br /&gt;
So, how can we make this signal countable? We do this by measuring the signal at specific intervals in time, say after 1 second duration. This leads to &lt;i&gt;discretization&lt;/i&gt; in time. What about the amplitude? That can also be discritized or divided into levels. For example, any amplitude between 0 and 0.9 Volts may be treated as 0 Volts, considering the signal is a voltage signal. The resulting signal may be as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM4wRcqGiTCbsXNyNMaCMMmvsrPhBKXKHsD_S7uMQC1Tu8wwu92mB0jF4lQKImHt-pgIOwWuukr2mwdcqGHI1-7CTTXT_gnJKnJcS0L4aOEuYcuz3i5qJJM6_ZH2k8WorZzcHQTE6_FaY/s1600-h/ampdisc.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM4wRcqGiTCbsXNyNMaCMMmvsrPhBKXKHsD_S7uMQC1Tu8wwu92mB0jF4lQKImHt-pgIOwWuukr2mwdcqGHI1-7CTTXT_gnJKnJcS0L4aOEuYcuz3i5qJJM6_ZH2k8WorZzcHQTE6_FaY/s320/ampdisc.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1NyR6qFCvIL7tUKRQNvLsxBOV_a3ksqHWgIcHRl1UQKp6DgatToGMJ0Ja4sYLNmObaPrRWCYqxZ7ENNeRcS6CH4hJ2grOfdo-1snnHlPMI7MAX4nZbSCAXD-QokkMNQlDXo_1htRy-wA/s1600-h/discrete.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1NyR6qFCvIL7tUKRQNvLsxBOV_a3ksqHWgIcHRl1UQKp6DgatToGMJ0Ja4sYLNmObaPrRWCYqxZ7ENNeRcS6CH4hJ2grOfdo-1snnHlPMI7MAX4nZbSCAXD-QokkMNQlDXo_1htRy-wA/s320/discrete.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwT3hKi8qKZ66VAyilKUZr9kiaTKPQRB6tbTg0A7f4D_c_4SeYc6zI8I53A6kcmPUL-UwEr33pP-8IzUP_OJiMtSY6pzGxjEQ4k4o37hyqpFAKrOk9N6rGsi7myG8uB4UPVP-wlj5u3p8/s1600-h/digital.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwT3hKi8qKZ66VAyilKUZr9kiaTKPQRB6tbTg0A7f4D_c_4SeYc6zI8I53A6kcmPUL-UwEr33pP-8IzUP_OJiMtSY6pzGxjEQ4k4o37hyqpFAKrOk9N6rGsi7myG8uB4UPVP-wlj5u3p8/s320/digital.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Here, we have discretized in time taking each sample after 3 seconds. The first diagram shows the signal discretized in amplitude, each amplitude level differing by one unit. The second diagram shows a discrete signal, that is the signal discretized in time. These two together result in a digital signal, as shown in the third figure, since at every point, its amplitude and time can be measured with 100% accuracy.&lt;br /&gt;
&lt;br /&gt;
So, now that we have got a more clear idea of what a digital signal is, let us see what digital electronics deals with. Well, obviously digital signals. Digital systems are systems that can work on digital signals and transform them for various purposes according to our needs. However, I said a little while ago that most of the signals we come across in nature are analog signals. Then why do we need digital signals? It is due to the fact, that digital systems such as our computers can deal only with the digital signals. Digital electronics grew in demand due to the fact that the digital systems can be implemented very easily, using only switches. In the present day market, switches are implemented using transistors, thus making a system able to incorporate a huge number of switches as well as increasing the speed of operation of systems manifold. Digital systems ensure better security and less noise on transmission. Due to all these factors, digital electronics has become a very important and fast developing branch of electronics.&lt;br /&gt;
&lt;br /&gt;
Having said so, we will next concentrate on how an analog signal may be converted into a digital signal in my next post.&lt;br /&gt;
&lt;br /&gt;
As for the question I asked you in my last post,&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: #999999; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&quot;Why do we need a usb programmer rather than serial programmer on laptops?&quot;&lt;/span&gt; &lt;/blockquote&gt;think a little more. I&#39;ll give you the answer on my next post. Till then, happy electronizing! &lt;/div&gt;</description><link>http://kaushanim.blogspot.com/2010/03/introduction-to-digital-electronics.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfCEDf9W7QO_n3Y22pYONcSdE9crhQO6Sh9gW0MnB6yJp_PNGxBbeoDcQhdXN0jlsd6cRAih3tWLb8dPUz39FFvdopqbR_o3kUPCA3ZHWNsyuKgyXl9zzzLix34GiLYaGAUi-Xvbb-B30/s72-c/analog.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5327588755518362492.post-6498421832144620054</guid><pubDate>Thu, 18 Feb 2010 08:21:00 +0000</pubDate><atom:updated>2010-03-23T22:47:18.057+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ATmega16</category><category domain="http://www.blogger.com/atom/ns#">Microcontrollers</category><category domain="http://www.blogger.com/atom/ns#">USBasp</category><title>Starting with Microcontrollers!</title><description>My very first day with ATmega16.. Well, I mean including hardware. Last time, when I programmed the &#39;SNAKE&#39;, I just did the programming part, but had no idea about the hardware and how to actually burn the code into it. It almost feels as if a new era is starting for me, the era of controllers. It feels wonderful!&lt;br /&gt;
&lt;br /&gt;
Started with the &#39;Hello World&#39; for microcontrollers, a small program in which we blink an LED at a frequency of 1KHz. It&#39;s really very simple, just switch on and off a port. When the LED started blinking, I felt on top of the world.&lt;br /&gt;
&lt;br /&gt;
I&#39;m using Atmel&#39;s ATmega16 and USBasp as programmer. I am using WinAVR. Needed lots of help, which I got from my ready resource, Merin. There are so many things you need to know in order to program a microcontroller! First you need to edit the &#39;makefile&#39;, which I couldn&#39;t understand how! Really, sometimes I can be so dumb! After I got that (thanks to Merin) things appeared simpler. You just need to select &#39;Enable Editing of Makefile&#39; and save it in the same directory as your C-program. Oh, and don&#39;t forget to set the name of your program in &#39;Target file name&#39;. You can edit the same from &#39;Makefile&#39;-&amp;gt;&#39;Main File Name...&#39; Next from Programmers&#39; Notepad select &#39;Tools&#39; -&amp;gt; &#39;make all&#39; and &#39;program&#39;. The program&#39;s programmed into the microcontroller and up and running in no time.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s the code for this &#39;Hello World&#39; program. I am using port b, pin 0 as the output port:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #999999;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;&quot;&gt;#include &amp;lt;avr/io.h&amp;gt; &lt;avr io.h=&quot;&quot;&gt;&lt;br /&gt;
#include &amp;lt;util/delay.h&amp;gt;&lt;util delay.h=&quot;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DDRB = 0xFF;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set port B as o/p port&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB = 0x00; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //initialize LED as off&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //loop indefinitely&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB |= 0x01;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set LED on&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(500);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //delay in mseconds&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PORTB &amp;amp;= 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set LED off&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _delay_ms(500);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;/util&gt;&lt;/avr&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
Ok, here&#39;s a question for you guys (only for those new to microcontrollers) - why do we need a usb programmer rather than serial programmer on laptops? Answer on next post, so keep a look out!</description><link>http://kaushanim.blogspot.com/2010/03/starting-with-microcontrollers.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item></channel></rss>