Docsity

digital-electronics-topic-1., Lecture notes of Electronics

Toggle sidebar
bg1
TOPIC I: NUMBER SYSTEM
. Number Systems In the history of mankind different number systems were
developed. Today the decimal system is universally used. However, it I~
neither the only number system nor it ~the simplest to use in many
applications. In recent years, mainly due to the development of the d1g1tal
computers and other digital instruments, the binary system has become
increasingly popular. A-2; Decimal Number System The decimal number
system uses 10 Arabic Indian symbols or digits. The digits are: 0, l, 2, 3 4 5 6
7 8 and 9 in order of ascending value. In any number system the number of
different digits that can be employed is called radix. Thus, since the decimal
system employs 10 digits, its radix is 10. · _ Now, in a decimal system the.
~highest digit is 9. ~umbers larger than? are ~constructed by assigning
values or weights to the pos1t10~ of the symbol with respect to the decimal
point. each position in a decimal number has a weight assigned to it which is
flen times the value of the next position to the left of the decimal point. For
example, in the decimal number 47, the positional value of digit 4 is ten
times the positional value of digit 7. ~very positional weight is a multiple of
the~ and can be express~~ as ! 0 raised to some power. . Startmg at the
decimal point the positional weight of the ones pos1t1on is 10 = 1. The next
position to the left ts the tens' position which carries a weight of 101= 10.
The next position to the left, the hundreds' position, --carries a positional
weight of 102=100. This progression of increasing exponents can be carried
as far as left to the decimal point as desired. As mentioned earlier each digit
has a weight or digit value~. Standing by itself, the digit 4 has a value of four
units. However, when the digit is associated with other digits to form a,
multidigit number, it has a positional weight in addition to its digit value. The
positional weight of the digit at the extreme right of the number is unity or
one. This is called the Least Significant Digit or simple LSD. The digit
occupying the extreme left position bas the greatest positional weight and is
called Most Significant Digit (MSD ). We have seen that in a decimal system,
the positional weights increase tenfold each time we , 1110ve by one
position to the left. Thus these positional weights may be represented in
ascending order of powers of 10. We have considered whole number integers
till now. When we' write a decimal fraction v.e
Binary Weighted DAC
Binary weighted digital-to-analogue converters are a type of data converter
which converts a digital binary number into [...]
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download digital-electronics-topic-1. and more Lecture notes Electronics in PDF only on Docsity!

TOPIC I: NUMBER SYSTEM

. Number Systems In the history of mankind different number systems were developed. Today the decimal system is universally used. However, it I~ neither the only number system nor it ~the simplest to use in many applications. In recent years, mainly due to the development of the d1g1tal computers and other digital instruments, the binary system has become increasingly popular. A-2; Decimal Number System The decimal number system uses 10 Arabic Indian symbols or digits. The digits are: 0, l, 2, 3 4 5 6 7 8 and 9 in order of ascending value. In any number system the number of different digits that can be employed is called radix. Thus, since the decimal system employs 10 digits, its radix is 10. · _ Now, in a decimal system the. ~highest digit is 9. ~umbers larger than? are ~constructed by assigning values or weights to the pos1t10~ of the symbol with respect to the decimal point. each position in a decimal number has a weight assigned to it which is flen times the value of the next position to the left of the decimal point. For example, in the decimal number 47, the positional value of digit 4 is ten times the positional value of digit 7. ~very positional weight is a multiple of the~ and can be express~~ as! 0 raised to some power.. Startmg at the decimal point the positional weight of the ones pos1t1on is 10 = 1. The next position to the left ts the tens' position which carries a weight of 101= 10. The next position to the left, the hundreds' position, --carries a positional weight of 102=100. This progression of increasing exponents can be carried as far as left to the decimal point as desired. As mentioned earlier each digit has a weight or digit value~. Standing by itself, the digit 4 has a value of four units. However, when the digit is associated with other digits to form a, multidigit number, it has a positional weight in addition to its digit value. The positional weight of the digit at the extreme right of the number is unity or one. This is called the Least Significant Digit or simple LSD. The digit occupying the extreme left position bas the greatest positional weight and is called Most Significant Digit (MSD ). We have seen that in a decimal system, the positional weights increase tenfold each time we , 1110ve by one position to the left. Thus these positional weights may be represented in ascending order of powers of 10. We have considered whole number integers till now. When we' write a decimal fraction v.e Binary Weighted DAC Binary weighted digital-to-analogue converters are a type of data converter which converts a digital binary number into [...]

o • Number Systems: An Introduction to Binary, Hexadecimal, and More Ever see crazy binary numbers and wonder what they meant? Ever see numbers with letters mixed in and wonder what is going on? You’ll find out all of this and more in this article. Hexadecimal doesn’t have to be scary. Introduction: What is a Number System? You probably already know what a number system is - ever hear of binary numbers or hexadecimal numbers? Simply put, a number system is a way to represent numbers. We are used to using the base-10 number system, which is also called decimal. Other common number systems include base- (hexadecimal), base-8 (octal), and base-2 (binary). In this article, I’ll explain what these different systems are, how to work with them, and why knowing about them will help you. 2 Million+ WordPress Themes & Plugins, Web & Email Templates, UI Kits and More Download thousands of WordPress themes and plugins, web templates, UI elements, and much more with an Envato Elements membership. Get unlimited access to a growing library to millions of creative and code assets. . Activity Before we get started, let’s try a little activity for fun. There are many different ways to represent a colour, but one of the most common is the RGB colour model. Using this model, every colour is made up of a combination of different amounts of red, green, and blue. You may be wondering how colours relate to number systems. In short, on a computer, any colour is stored as a large number: a combination of red, green, and blue. (We’ll go into more detail on this later.) Because it’s just a number, it can be represented in multiple ways using different number systems.

You may have noticed a pattern by now. Let’s look at what is going on mathematically, using 2347 as an example.  As you saw, there are 2 groups of a thousand. Not coincidentally, 1000 = 101010 which can also be written as 10^3.  There are 3 groups of a hundred. Again, not coincidentally, 100 = 1010 or 10^2.  There are 4 groups of ten, and, 10 = 10^1.  Finally, there are 7 groups of one, and 1 = 10^0. (That may seem strange, but any number to the power of 0 equals 1, by definition.) This is essentially the definition of base-10. To get a value of a number in base-10, we simply follow that pattern. Here are a few more examples:  892 = 810^2 +910^1 +210^0  1147 = 110^3 +110^2 +410^1 +710^0  53 = 510^1 +310^0 Admittedly, this all seems a little silly. We all know what value a base- number is because we always use base-10, and it comes naturally to us. As we’ll see soon, though, if we understand the patterns in the background of base-10, we can understand other bases better. Base- On to base-8, also called octal. Base-8 means just what is sounds like: the system is based on the number eight (as opposed to ten). Remember how in base-10 we had ten digits? Now, in base-8, we are limited to only eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. There’s no such thing as 8 or 9. We count the same way as we normally would, except with only eight digits. Instead of a lengthy explanation, simply try out the demo below by clicking Count Up 1 to see how counting in base-8 works. You should notice a similar pattern to before; after we get to 7, we run out of different digits for any higher number. We need a way to represent eight of something. So we add another digit, change the 7 back to 0, and end up with

  1. Our answer of 10 in base-8 now represents what we would normally think of as 8 in base-10. Talking about numbers written in multiple bases can be confusing. For example, as we have just seen, 10 in base-8 is not the same as 10 in base-
  2. So, from this point on, I’ll use a standard notation where a subscript denotes the base of numbers if needed. For example, our base-8 version of 10 now looks like 108.

(Editor’s note: I find it a lot easier to understand this if I change the way I read these numbers in my head, too. For example, for 108, I read “octal one- oh” or “one-oh in base-eight”. For 1010 I read “decimal one-oh” or “one-oh in base-ten”.) Great, so we know 108 represents eight items. (Always feel free to plug a number into the first tool for a visualization.) What’s the next number after 778? If you said 1008, you’re correct. We know from what we’ve learned so far that the first 7 in 778 represents groups of 8, and the second 7 represents induvidual items. If we add these all up, we have 78 + 71 = 63. So we have a total of 6310. So 778=6310. We all know 6410 comes after

Converting From Base-8 to Base- Let’s look at a wordier example now. John offers to give you 478 cookies, and Jane offers to give you 4310 cookies. Whose offer do you take? If you want, go ahead and generate the graphic for 478 graphic with the first tool. Let’s figure out its base-10 value so we can make the best decision! As we saw when counting, the four in 478 represents the number of groups of eight. This makes sense - we are in base-8. So, in total, we have four groups of eight and seven groups of one. If we add these all up, we get 4*

  • 7*1 = 3910. So, 478 cookies is the exact same as 3910 cookies. Jane’s offer seems like the best one now! The pattern we saw before with base-10 holds true here also. We’ll look at
  1. There are five groups of 8^2 , two groups of 8^1 and three groups of 8^0 (remember, 8^0 =1). If we add these all up, 58^2 + 28^1 + 38^0 = 564+28+ = 339, we get 33910 which is our final answer. The diagram below shows the same thing visually: Converting 523 from base-8 to base- Here are a couple more examples:  1118 = 18^2 +18^1 +18^0 = 64+8+1 = 7310  438 = 48^1 +38^0 = 32+3 = 3510  61238 = 68^3 +18^2 +28^1 +38^0 = 3072+64+16+3 = 315510 Converting from Base-10 to Base- Converting from base-10 to base-8 is a little trickier, but still straightforward. We basically have to reverse the process from above. Let’s start with an example: 15010.

in hexadecimal to make sure we can apply what we’ve learned about other bases so far. Since we are working with base-16, we have 16 digits. So, we have 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ... and yikes! We’ve run out of digits, but we still need six more. Perhaps we could use something like a circled 10? The truth is, we could, but this would be a pain to type. Instead, we simply use letters of the alphabet, starting with A and continuing to F. Here’s a table with all the digits of base-16: B a s e 1 6 D i g i t V a l u e 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 A 1 0 B 1 1 C 1 2 D 1 3 E 1 4 F 1 5 Other than these extra digits, hexadecimal is just like any other base. For example, let's convert 3D16 to base-10. Following our previous rules, we have: 3D16 = 316^1 + 1316^0 = 48 + 13 = 61. So 3D16 is equal to 6110. Notice how we use D's value of 13 in our calculation. We can convert from base-10 to base-16 similar to the way we did with base-

  1. Let's convert 69610 to base-16. First, we find the largest power of 16 that is less than 69610. This is 16^2 , or 296. Then:
    1. 696/16^2 = 2 remainder 184
    2. 184/16^1 = 11 remainder 8
    3. 8/16^1 = 8 remainder 0 We have to replace 11 with its digit representation B, and we get 2B816.

Feel free to try some more conversions for practice. You can use the application below to check your answers: Binary! (Base-2) On to the famous base-2, also called binary. While everyone knows binary is made up of 0s and 1s, it is important to understand that it is no different mathematically than any other base. There’s an old joke that goes like this: “There are only 10 types of people in the world: those who understand binary and those who don’t.” Can you figure out what it means? Let’s try a few conversions with base-2. First, we’ll convert 1011002 to base-

  1. We have: 101100 = 12^5 + 12^3 + 1*2^2 = 32 + 8 + 4 = 4410. Now let’s convert 65 to binary. 2^6 is the highest power of 2 less than 65, so:
    1. 65/2^6 = 1 remainder 1
    2. 1/2^5 = 0 remainder 1
    3. 1/2^4 = 0 remainder 1
    4. 1/2^3 = 0 remainder 1
    5. 1/2^2 = 0 remainder 1
    6. 1/2^1 = 0 remainder 1
    7. 1/2^0 = 1 remainder 0 And thus we get our binary number, 1000001. Understanding binary is super important. I’ve included a table below to point out digits’ values. For example, the value of 10001 is 17, which is the sum of the values of the two 1 digits (16+1). This is nothing different than we have done before, its just presented in an easy to read way. Tricks and Tips Normally, when converting between two bases that aren’t base-10, you would do something like this:
    8. Convert number to base-
    9. Convert result to desired base

system (radix r represents base of number system) there are two types of complements. S. N . C o m p l e m e n t D e s c r i p t i o n 1 R a d i x C o m p l e m e n t The radix complement is referred to as the r's complement 2 D i m i n i s h e d R a d i x C o m p l e m e n t The diminished radix complement is referred to as the (r- 1)'s complement Binary system complements As the binary system has base r = 2. So the two types of complements for the binary system are 2's complement and 1's complement. 1's complement The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is called as taking complement or 1's complement. Example of 1's Complement is as follows. 2's complement The 2's complement of binary number is obtained by adding 1 to the Least Significant Bit (LSB) of 1's complement of the number. 2's complement = 1's complement + 1 Example of 2's Complement is as follows.

Binary Addition It is a key for binary subtraction, multiplication, division. There are four rules of binary addition. In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given column and a carry of 1 over to the next column. Example − Addition Binary Subtraction Subtraction and Borrow , these two words will be used very frequently for the binary subtraction. There are four rules of binary subtraction.

Binary division is similar to decimal division. It is called as the long division procedure. Example − Division Octal Number System Following are the characteristics of an octal number system.  Uses eight digits, 0,1,2,3,4,5,6,7.  Also called base 8 number system.  Each position in an octal number represents a 0 power of the base (8). Example: 8^0  Last position in an octal number represents an x power of the base (8). Example: 8x^ where x represents the last position - 1. Example Octal Number − 12570 8 Calculating Decimal Equivalent − S t e p O c t a l N u m b e r D e c i m a l N u m b e r S t e p 1

8

((1 × 8 4 ) + (2 × 8 3 ) + (5 × 8 2 ) + (7 × 8 1 ) +

(0 × 8 0 )) 1

S t e p 2

8

S t e p (^1 2 5 7 0 5 4 9 6 )

Note − 125708 is normally written as 12570. Octal Addition Following octal addition table will help you to handle octal addition. To use this table, simply follow the directions used in this example: Add 6 8 and 5 8. Locate 6 in the A column then locate the 5 in the B column. The point in 'sum' area where these two columns intersect is the 'sum' of two numbers. 68 + 5 8 = 13 8. Example − Addition Octal Subtraction The subtraction of octal numbers follows the same rules as the subtraction of numbers in any other number system. The only variation is in borrowed number. In the decimal system, you borrow a group of 10 10. In the binary system, you borrow a group of 2 10. In the octal system you borrow a group of

Example − Subtraction

Hexadecimal Addition Following hexadecimal addition table will help you greatly to handle Hexadecimal addition. To use this table, simply follow the directions used in this example − Add A 16 and 5 16. Locate A in the X column then locate the 5 in the Y column. The point in 'sum' area where these two columns intersect is the sum of two numbers. A 16 + 5 16 = F 16. Example − Addition Hexadecimal Subtraction

The subtraction of hexadecimal numbers follow the same rules as the subtraction of numbers in any other number system. The only variation is in borrowed number. In the decimal system, you borrow a group of 10 10. In the binary system, you borrow a group of 2 10. In the hexadecimal system you borrow a group of 16 10. Example - Subtraction