CS302 Lecture Wise Questions By Virtualians.pk

Size: px
Start display at page:

Download "CS302 Lecture Wise Questions By Virtualians.pk"

Transcription

1 Q)How to count Result of binary encoding? Like or Answer: Binary of 024 is: s complement arithmetic is commonly used in computers to handle negative numbers. For example, we want to represent decimal number -015 in 2's complement form. First, write the binary of Now, take its 1's complement (by inverting the bits) Finally, the 2's complement (by adding 1 to its 1's complement) So, decimal -015 = 's complement Q) Rule for Octal Addition? In Octal addition, same rules are followed as used in decimal or binary addition. The only difference is if the sum exceeds the octal range (0 to 7), then subtract 8 from the sum until the result is reached to one of the octal digits from 0 to 7. The carry 1 is generated for the left most significant digits. Example: The addition between two octal numbers (8 A 5 C) 16 and (F 3 9 A) 16 Carry Prepared By: Irfan Khan (Chief Admin) Page 1

2 6 0 1 (As = 9, so 9 8 = 1. We write 1 in answer and carry 1 to the left most significant bit. And so on) The resulting octal number is (601) 8 The term mapping is used in K-Maps. It means to fill the K-Map with either 1 or 0 on the basis of minterms or maxterms present in the function. Q)How Hexadecimal addition is done? Hexadecimal addition can be achieved through repeated subtraction of 16 from the decimal sum of same place values of hex numbers until the result is reached to one of the hex digits from 0 to F. The carry increases by 1 where each time the number 16 is subtracted from the hex numbers decimal sum. The below example lets you understand how to perform hex numbers addition Example: The addition between two hex numbers (8 A 5 C) 16 and (F 3 9 A) 16 Carry A 5 C F 3 9 A 1 7 D F 6 Prepared By: Irfan Khan (Chief Admin) Page 2

3 (As C + A = 22, so = 6. We write 6 in answer and carry 1 to the left most significant bit. And so on) The resulting hexadecimal number is (17DF6) 16 In hexadecimal subtraction, borrow is 16 (as borrow is 10 in decimal number system) if the first number is smaller than the second number. Borrow B 5 2 A C E F (As 5 is smaller than 6. So it will take borrow (16) from the left. So it will become = 21. Now, 21 6 = 15. And so on) The resulting hexadecimal number is (67EF) 16 Q) What is Flip flop? Prepared By: Irfan Khan (Chief Admin) Page 3

4 Flip flop is the storage element in sequential circuits. It has two stable states and a feedback path that allows it to store a bit of information. A flip-flop only changes state when a control signal goes from high to low or low to high. There are many types of flip-flops like SR Flip-flop, JK Flip-flop, D Flip-flop, etc. Q) What is Parity Generator? Parity Generator is a circuit that generates parity bit both in Even and Odd parity modes. The function table of odd-parity generator circuit shows the Parity bit set to 1 in P column of table 14.1,when the 16, 4-bit data input combinations have even number of 1s and when data input combinations have old number of 1s then it will be 0 in P column. Q) What is BCD and its use? Binary Coded Decimal (BCD) code is a 4-bit code and is used to represent decimal digits 0 to 9 in binary. Only 1st ten binary values are used to represent decimal values from 0 (0000) to 9 (1001). The remaining six 4-bit combinations 1010, 1011, 1100, 1101, 1110 and 1111 are considered to be invalid and do not exist. To represent decimal number in BCD, we write BCD codes of individual digits. Forexample, BCD code for 216 is BCD code for 23 is Q)What is BCD Adder Circuit? In Binary Coded Decimal (BCD), the adder is actually working in hex, 0xA shows the hexadecimal number. If the addition of two BCDdigits results in an invalid result, the result must be between 0xA (1010) and 0xF (1111). Prepared By: Irfan Khan (Chief Admin) Page 4

5 By adding 6 to this value and generating a carry, you generate the proper BCD values: 0xA + 0x6 = 0x10 (the BCD value 10) 0xB + 0x6 = 0x11 (the BCD value 11) etc. So by adding 6 we use the hardware BCD adder circuit of the computer which is designed for counting in binary to skip over the binary values we won't need because we want to represent digits in BCD. In table 15.1 shows if the circuit finds the result of the first Adder circuit to be a valid BCD number (between 0 and 9 and no Carry has been generated), the circuit adds a zero to the valid BCD result using the second Adder. The output of the second Adder gives the same result. Q) What is Standard form of Product terms? The Product terms in the Standard SOP (Sum OF Product) form are known as Minterms and the Sum terms in the Standard POS (Product OF Sum) form are known as Maxterms. 1 or 0 are placed according to minterm and maxterm term expression. Please firstly see the table 9.5 then you will understand A represents in minterm is 1 and in maxterm is 0 and A represents in minterm is 0 and in maxterm is 1.e.g The Standard SOP (Minterm) expression having a Domain of three variables ABC + AB C + A BC is mapped into 3-Variable Karnaugh Map. A\BC You can see ABC in binary (110), this number check in table and put 1 in second row and last column. Same like in second expression AB C, put 1 in (100) means second row and first column. Lastly check third expression A BC, put 1 in (010) means first row and last column. Prepared By: Irfan Khan (Chief Admin) Page 5

6 Q) What is GAL and its Use? GAL is one of type of Programmable Logic Devices and it is also available in a variety of configurations. Like GAL16V8 firstly you can elaborate these 4 terms in wording for better understanding. GALs are identified by a prefix Generic array Logic followed by a 2-digit number indicating the number of inputs (that is Sixteen Inputs) which is followed by V indicating variable output configuration followed by a number which indicates the number of outputs(that is Eight Outputs). What is Logic Function Generator? A multiplexer can work as a logic function generator. The purpose it serves is that it can generate expression of a function, against the values mentioned in the output of a truth table. Actually on the basis of truth table we connect the different combinations of data select inputs to either 0 or 1. Those combinations at which the output is 1 in the truth table are connected to 1, whereas all other combinations are connected to 0. We apply all the input combinations of data select inputs, and final output is generated to 1 or 0 depending on the input combination applied. In this way we can get the function in SOP form. Lecture no 1 Digital representing of quantities Digital quantities unlike Analogue quantities are not continuous but represent quantities measured at discrete intervals. Q)What are the differences between digital and analog circuits? Analog circuits operate on a continuous range of voltages. For example, an audio signal may range anywhere from 0V to 1000mV, and an infinite number of places between. Prepared By: Irfan Khan (Chief Admin) Page 6

7 Digital circuits operate on only one of two states: "off" or "on", typically represented as 0 and 1. These on and off states are represented by different voltages in different systems. But any given digital signal will have one of only two distinct values. For example, a typical digital signal will dictate that anything below 1.0V is considered "off", and anything above 4.5V is considered "on". Information in digital circuits is represented as either a consecutive stream of these on and off states ("serial") (ex: ) or a set of signals together representing a value ("Parallel") where 8 wires represent 8 bits of a one byte value. Q) Difference between CMOS and TTL? TTL stands for Transistor-Transistor Logic. It is a classification of integrated circuits. The name is derived from the use of two Bipolar Junction Transistors or BJTs in the design of each logic gate. CMOS (Complementary Metal Oxide Semiconductor) is also another classification of ICs that uses Field Effect Transistors in the design. The primary advantage of CMOS chips to TTL chips is in the greater density of logic gates within the same material. A single logic gate in a CMOS chip can consist of as little as two FETs while a logic gate in a TTL chip can consist of a substantial number of parts as extra components like resistors are needed. TTL chips tend to consume a lot more power compared to CMOS chips especially at rest. The power consumption of a CMOS chip can vary depending on a few factors. One major factor in the power consumption of a CMOS circuit is the clock rate, with higher values resulting to higher power consumption. Typically, a single gate in a CMOS chip can consume around 10nW while an equivalent gate on a TTL chip can consume around 10mW of power. That is such a huge margin, which is why CMOS is the preferred chip in mobile devices where power is supplied by a limited source like a battery. CMOS chips are a bit more delicate compared to TTL chips when it comes to handling as it is quite susceptible to electrostatic discharge. People often unwittingly damage their CMOS chips from simply touching the terminals as the amount of static electricity needed to damage CMOS chips are too minute for people to notice. Prepared By: Irfan Khan (Chief Admin) Page 7

8 The prominence of CMOS chips has pushed TTL chips to the background. Instead of being the primary IC of choice, it is now used as components that link the whole circuit as glue logic. CMOS chips that emulate the TTL logic has also gained prominence and is slowly replacing most TTL chips. These chips have similar name to their TTL equivalent so that users can easily identify them. 1. TTL circuits utilize BJTs while CMOS circuits utilize FETs. 2. CMOS allows a much higher density of logic functions in a single chip compared to TTL. 3. TTL circuits consumes more power compared to CMOS circuits at rest. 4. CMOS chips are a lot more susceptible to static discharge compared to TTL chips. 5. There are CMOS chips that have TTL logic and are meant as replacements for TTL chips. Q) What is the use of caveman? Caveman number system is just a method of representing numbers like some other methods e.g hexadecimal or octal, it has no connection with our daily life. Q) what do u meant by Sequential circuits? Sequential circuit one type of digital circuits which has memory element in it. Q) What is difference between digital system and values? Prepared By: Irfan Khan (Chief Admin) Page 8

9 Digital systems are those system which measure are give outputs in only two digits, 1 or 0. where as digital values are 1 and 0. Q) What is radix? Every number system is represented by a base value, for example decimal number system is base 10 system, hexadecimal system is base 16 system and this base is called radix. Q) Decimal to binary conversion using sum of weights? Suppose we want to convert decimal number 392 into its equivalent binary, follow the following steps Step 1: Draw a 4 column table Step 2: Write multiples of 2 starting from 1 from bottom to top in weight column Step 3: write decimal number 392 in Number column Step 4: Now see whether 392 is greater or equal to 256? If so, place 1 in Binary column and if it is less place zero in Binary column Step 5: Subtract number from its respective weight and write the result in next row and repeat the procedure again until weight 1 is reached Step 6: write the binary digits from top to bottom So binary number for decimal 392 is Lecture no 2 Prepared By: Irfan Khan (Chief Admin) Page 9

10 .Q)Sum-of-non-zero terms? In the Sum-of-Weights method, the Binary bits 0 do not contribute towards the final sum representing the decimal equivalent. Secondly, the weight of each binary bit increases by a factor of 2 starting with a weight of 1 for the least significant bit. For example, the Binary number has weights 20=1, 21=2, 22=4, 23=8 and 24=16 corresponding to the bits 0, 1, 1, 0 and 1 respectively. Q)Explain it please how 2 power 0 =1? A quicker method is to add the weights of non-zero terms. Thus for the numbers o = = 19 o = ½ + 1/8 = /8 = Q)Signed and Unsigned Binary Numbers Digital systems not only handle positive numbers but both positive and negative numbers. In the decimal number system positive numbers are identified by the + sign and Prepared By: Irfan Khan (Chief Admin) Page 10

11 negative numbers are represented by the sign. In a digital system which uses the Binary number system, the positive and negative signs can not be represented as + and -. As mentioned in the Overview all forms of numbers, text, punctuation marks etc. are represented in the form of 1s and 0s. Thus the positive and negative signs are also presented in terms of binary 0 and 1. To handle positive and negative binary numbers, the digital system sets aside the most significant digit (bit) to represent the sign MSB set to 1 indicates a negative number MSB set to 0 indicates a positive number Thus +13 and -13 are represented as 01101and respectively. The bits 1101 represent the number 13 and the MSBs 0 and 1 represent positive and negative signs respectively. Thus binary numbers having the MSB signifying the Sign bit are treated as Signed Binary Numbers. This representation is known as the Signed-Magnitude representation. Digital systems also handle binary numbers which are assumed to be positive and therefore do not have the most significant sign bit. Such numbers are known as signed and unsigned. Thus represent -13 in signed binary and 29 in unsigned binary. A digital system on its own cannot decide how to handle a binary number. The digital system has to be notified beforehand to deal with a certain binary representation as signed or unsigned. Q)Range of Signed and Unsigned Binary numbers? The maximum range of values that can be represented in any number system depends upon the number of digits assigned to represent the value. A 5-digit car odometer can only count up to 99,999 and then it rolls back to Similarly an 8-digit calculator can only handle integer numbers of the magnitude 99,999,999. A calculator that reserves the most significant digit to write + or can only handle a maximum range of integer numbers from - 9,999,999 to +9,999,999. Prepared By: Irfan Khan (Chief Admin) Page 11

12 Q)What is? A 3-bit unsigned binary number can have values ranging between 000 and 111.Adding 100 and 111 unsigned numbers results in 1011, this result is considered to be out of range as 4 bits are required. Similarly a 4-bit sign magnitude number can handle a number range between -7 and can not be represented as 5-bits are required A 4-bit 2 s complement based signed number range is between -8 to +7. Binary Addition? Addition between two binary numbers and it is also called asbinary Addition. Binary numbers are the numeric codes to represent the numbers. The numeric codes are group of bits 0s and 1s 0 and 1 which are weighted by the specific values based on their places. In digital circuits, binary arithmetic operations are important because the digital circuits do not process decimal numbers; only works based on the binary numbers. The below binary addition logic is used in this binary addition calculator to perform the addition between binary numbers. The equivalent decimal addition also done by this binary adder for verification of the results Binary Addition Logic = = = = = 11 Prepared By: Irfan Khan (Chief Admin) Page 12

13 Binary Subtraction: Key Subtraction Results for Binary Numbers 1 0 = = = 10 When you add and subtract binary numbers you will need to be careful when 'carrying' or 'borrowing' as these will take place more often. Prepared By: Irfan Khan (Chief Admin) Page 13

14 Prepared By: Irfan Khan (Chief Admin) Page 14

15 Binary Multiplication: Prepared By: Irfan Khan (Chief Admin) Page 15

16 Q)What is the 1's and 2's complement? A two's-complement system or two's-complement arithmetic is a system in which negative numbers are represented by the two's complement of the absolute value; this system is the most common method of representing signed integers on computers. There are two steps of taking 2 s complement of a number. i- Take 1 s complement of the number, that is, change 0 to 1 and 1 to 0. ii- Add 1 into the 1 s complement calculated above. For example: The number is s complement Add So is the 2 s complement of Q)What are PLD devices? A programmable logic device or PLD is an electronic component used to build reconfigurable digital circuits. Unlike a logic gate, which has a fixed function, a PLD has an undefined function at the time of manufacture. Before the PLD can be used in a circuit it must be programmed, that is, reconfigured. Q) How PLDs are programmed? Prepared By: Irfan Khan (Chief Admin) Page 16

17 PLD can be programmed using Hardware Descriptive Languages (HDLs) languages like ABEL, Verilog, VHDL. Q) what does mean by complement of binary number and what is difference between complement of 1 and 2? Complement here means inverting the bits, that is, change 0 to 1 and 1 to 0. Complement and 1 s complement is the same thing. For example, we want to take the complement of binary number (original number) (1 s complement) The 2 s complement of a binary number is obtained by adding 1 to its 1 s complement (original number) (1 s complement) + 1 (Adding 1) (2 s complement) 2 s complement arithmetic is commonly used in computers to handle negative numbers. For example, we want to represent decimal number -39 in 2's complement form. First, write the binary of Prepared By: Irfan Khan (Chief Admin) Page 17

18 Now, take its 1's complement (by inverting the bits) Finally, the 2's complement (by adding 1 to its 1's complement) So, decimal -39 = 's complement Q)Is BCD a positional code? BCD code is used to represent decimal digits in binary. BCD code is a 4-bit code, each digit is represented by 4-bits binary code. The first 10 combinations represent the decimal digits 0-9, the remaining 6 combinations are considered to be invalid BCD code. BCD is a positional number system where BCD code for each digit has some weights such as BCD code 1001 has weights 8, 4, 2, 1 which can be converted as = 9 The BCD code for 28 will be The first four bits represents 4-bit binary code of 2 whereas remaining 4 bits represents binary code of 8 Q) Can we directly Convert octal numbers into Hexadecimal? Octal number can be converted into Hexadecimal by first converting into Binary number and then from Binary to Hexadecimal. Prepared By: Irfan Khan (Chief Admin) Page 18

19 Octal Number: 7564 Each digit of Octal number can be represented by 3 bits. Now replacing each digit with 3 bits 7564 = The above binary number can be converted into Hexadecimal by grouping into small groups of 4 bits each starting from lease significant bit = F74 (Hexadecimal) Q) What is meant by signed nd unsigned Binry Numbers? Signed Numbers: The numbers which can handle both positive and negative numbers are known as signed numbers. The MSB (Most Significant Bit) of such numbers is used to represent the sign of number. If MSB is set to logic 1 then numbers is treated as negative numbers and if MSB is set to logic 0 then number is treated as positive number. For example, +10 and -10 can be represented in signed numbers as (+10 in deciaml) and Prepared By: Irfan Khan (Chief Admin) Page 19

20 (-10 in decimal) indicates binary representation of decimal 10 whereas 0(MSB) and 1(MSB) in both numbers indicate the sign of numbers. Unsigned Numbers: The numbers which can handle only positive numbers and do not have most significant bit as a sign bit are known as unsigned numbers. Q) What is troubleshooting? Troubleshooting is the process of identification or diagnosis of problems in the system. It first determines the cause of problems in the system and then applies problem solving to repair failed system. It is needed to keep the system in working condition whenever a problem occurs in the system. Q) What does MSB Stnd for? MSB stands for Most Significant Bit which is left most bit In the above binary number, the highlighted bit is MSB (Most Significant Bit). Q) Why we use the fixed point technique? Fixed point representation is used for representing fractional value for the processor that does not support FPU (Floating Point Unit). It provides a simple way for representing fractional values using fixed number of bits. In fixed point number representation, there is fixed number of bits to the right of decimal point and fixed number of bits to the left of decimal point. The bits to the right of decimal point are called fraction part whereas bits to the left of decimal point are called integer part. Prepared By: Irfan Khan (Chief Admin) Page 20

21 The fixed point can represent limited range of values whereas floating point numbers may increase the range of values. Q) What is the precise definition of "weight" in number system? In positional number system, each digit has some weight according to its postion. The left most digit has the highest weight whereas right most digit has lowest weight. The weight can be represented as base raise to power positon of digit. The decimal system is a base 10 number system. In the decimal value 560, the digit 0 has position 0 and has weight 100, the digit 6 has position 1 and has weight 101, the digit 5 has position 2 and has weight = = 560 Q) What is Logic gates? Logic gates are the basic building block of digital systems. Digital circuits are made from the combination of logic gates which performs Boolean logic operation such as AND, OR and NOT operations. AND gate performs logical multiplication operation, OR gate performs addition operation whereas NOT gate performs inversion operation. Q) What is PLD? PLDs (Programmable logic device): It is used in many applications to replace the logic gates and MSI chips. The PLDs are used to save the circuit space by reducing logic gates and reduce the cost of components in logic circuits. It provides general purpose hardware which can be programmed by end user. The logic gates such as AND, OR and XOR gates provides a pre-defined functions whereas PLDs do not provide pre-defined function at manufacturer time. It can be programmed using array of AND gate and array of OR gate. It consists of array of AND and OR gate that can be used to implement any kind of sequential and combinational circuit. PLDs consist of array of AND gate followed by array of OR gate. Prepared By: Irfan Khan (Chief Admin) Page 21

22 Q) Negative representation of 2's compliment:? In two s complement, positive integers are represented in standard binary, as in signed magnitude. However, the representation of a negative number is determined as follows: (1) compute a binary representation of the magnitude of the number, (2) flip all the bits, and (3) add 1. For example, the 8-bit two s complement representation of 13 is (as before) while 13 is represented as follows (using the steps given above): 13 (1) = (2) = (3) = the Process for -5: Binary number for decimal 5 is :0101 same for 5 and -5 like for +5 its value is 0101 then converting in -5 it will take 1010( all 1s are replaced by 0s and 0s with 1s) and then in to 1011(1is inserted/added at the end of binary number) Q)Binary to Decimal Conversion: Most real world quantities are represented in Decimal Number System. Digital Systems Onon the other hand are based on the Binary Number System. Therefore, when converting from the Digital Prepared By: Irfan Khan (Chief Admin) Page 22

23 Domain to the real-world, Binary numbers have to be represented in terms of their Decimal equivalents The method used to convert from Binary to Decimal is the Sum-of-Weights method.the Sum-of-Weights method has been used to represent the Caveman numbers some symbols and the Binary numbers and Q)What Is Sum Of Weights Method? Sum-of-Weights Method Sum-of-weights as the name indicates sums the weights of the Binary Digits (bits) of abinary Number which is to be represented in Decimal. The Sum-of-Weights method can beused to convert a Binary number of any magnitude to its equivalent Decimal representation. In the Sum-of-Weights method an extended expression is written in terms of the Binary Base Number 2 and the weights of the Binary number to be converted. The weights correspond to each of the binary bits which are multiplied by the corresponding binary value.binary bits having the value 0 do not contribute any value towards the final sum expression. Prepared By: Irfan Khan (Chief Admin) Page 23

24 Q)How we have to find highest weight? The Highest weight in decimal fractions can be found in the same way as described for decimal (integer) to binary conversion. The only difference is that we check for ve powers of 2 (2-1, 2-2, 2-3,.) to find the highest weight. This is because of the reason that powers of 2 become ve towards right of the decimal point (2-1, 2-2, 2-3 ). For example, Sum Term Highest Weight Binary Number Sum term = Sum Term Highest Weight Here, 2-1 = ½ = 0.5 is highest weight which is below So, Binary number will be Next 2-3 = 1/8 = is highest weight. So, binary number will be Q) What are floating point notations in the binary number system? Prepared By: Irfan Khan (Chief Admin) Page 24

25 Basically there are different ways of representing numbers in binary. Floating point notations is one of them and it is used to help in handling numbers having an integer and a fraction part. 32 Bits of Floating-Point numbers are divided in to this partition. The single Sign (S) bit represents the sign of the number (0=positive 1=negative),the Exponent (E) 8 bits represent the exponent, the Mantissa 23 bits represent the magnitude of the number. For example 15-digit Decimal Floating Point Number The number x 10 4 is represented in decimal floating point notation as The Sign (S) 1 digit represents the sign of the number (+/ ),the Exponent (E) 2 digits represent the exponent, the Mantissa 12 digits represent the magnitude of the number. Q)"2bits normally represents four values in binary number system"explain the following statement? As we have two digits 0 and 1 in binary number system. We can arrange these two digits in four different combinations 00, 01, 10, 11, to represent four different values. The number of combinations can be calculated by using the formula 2n, where n is the number of bits. Q)How we will convert number into binary using repeated multiplication by 2? Answer: Separate the integer part and fraction part first. Integer part = 48 Fraction Part = Prepared By: Irfan Khan (Chief Admin) Page 25

26 Step 1: Convert the Integer part 48 into its equivalent in binary using any method specified = in binary Step 2: Convert the fractional part into binary using repeated multiplication by 2. Integer part after Number multiplication = in binary Decimal point will always be placed on left of the fractional part. Step 3: Now combining integer part and fractional part in binary, we get, = in binary = ( ) 2 Fraction part after multiplication Prepared By: Irfan Khan (Chief Admin) Page 26

27 Lecture no 3 Hexadecimal Numbers The Hexadecimal number system is a base 16 number system and therefore has 16 digits and is used primarily to represent binary strings in a compact manner. Hexadecimal number system is not used by a Digital System. The Hexadecimal number system is for our convenience to long binary strings in a short and concise form. Each Hexadecimal Number digit can represent a 4-bit Binary Number Hexadecimal to Binary Conversion Converting from Hexadecimal back to binary is also very simple. Each digit of the Hexadecimal number is replaced by an equivalent binary string of 4-bits. FD13 Hexadecimal Number Replacing each Hexadecimal digit by its 4-bit binary equivalent. Q) What is weight method? Suppose we want to convert decimal number 392 into its equivalent binary, follow the following steps Step 1: Draw a 4 column table Step 2: Write multiples of 2 starting from 1 from bottom to top in weight column Step 3: write decimal number 392 in Number column Step 4: Now see whether 392 is greater or equal to 256? If so, place 1 in Binary column and if it is less place zero in Binary column Step 5: Subtract number from its respective weight and write the result in next row and repeat the procedure again until weight 1 is reached Step 6: write the binary digits from top to bottom So binary number for decimal 392 is Q)What is the 2's compliment of 00000? Take 1's complement of first = add 1 in 1's complement = = so 2's complement of is Prepared By: Irfan Khan (Chief Admin) Page 27

28 Q)What are first and second complement? 1's complement is calculated by revesing each bit and 2's complement is obtained by adding 1 in 1's complement. These complements are used just to represent different forms of binary numbers. For example (7) 0111 = 1's complement 1000 then Add = (-7) Q)What is mantissa? Mantisa is the magnitude of the number after it has been converted to required format. For example we want the number x 103 to represent it into "decimal number floating-point format" the the number firstly will be written as x 104. In this, magnitude is called mantisa. Q)What is meant by Highest weight in decimal to binary conversion? Weight of binary bits starts from 1 and increases by multiple of two so highest weight means that the staring weight should not be greater then the decimal number which is being converted into binary. Weights go like this Now suppose we want to convert decimal 350 and 615 to their equivalent binaries, the highest weights for 350 and 615 are 256 and 512 respectively. Prepared By: Irfan Khan (Chief Admin) Page 28

29 Q)What is Range? Range means that how many numbers can be represented by certain number of bits. For exapmle if we have 3 bits, total 8 numbers ( 0 to 7) can be represented by these three bits so maximum number is 7 and total numbers are 8. We can say that range of binary number having 3 bits is 8 or 23 or in general if you have n number of bits the range would be 2n. Similarly in "signed magnitude representation" both positive and negative numbers can be represented. If we have 'n' number of bits the total positive numbers that can be represented are (2n-1-1) and total negative numbers that can be represented are (2n-1-1). Suppose you have 4 bits then =7 positive numbers and 7 negative numbers can be represented. So range is from +7 to on November 1, 2013 at 8:50am Q)What do u meant by MSB/LSB? The MSB (most significant bit) is in binary sequence, it is farthest to the left (or first) or greatest value in contrast LSB (least significant bit) is farthest to the right (or last) or right-most bit. Let s see this example, in the binary number 1000, the MSB is 1 and LSB is 0. Q)How many methods are there to represent Binary to Decimal and Decimal to Binary? There are two methods used for decimal to binary and binary to decimal conversion which are mentioned on page no:14 to 18 of handouts. For example: By using Repeated Division-by-2 method, it converted into decimal to binary and vice versa Decimal number =19 Prepared By: Irfan Khan (Chief Admin) Page 29

30 Repeated Division-by-2 method Quotient after Number division Binary number = = 1 x x x x x 2 0 = Remainder after division = 19 Q)What is Flip Flop circuit? Flip flop is the storage element in sequential circuits. It has two stable states and a feedback path that allows it to store a bit of information. A flip-flop only changes state when a control signal goes from high to low or low to high. There are many types of flip-flops like SR Flip-flop, JK Flip-flop, D Flip-flop, etc. what is Sequential Logic: Sequential Logic: Sequential logic is the form of a logic circuit whose output depends on the present input state(s) as well as on the previous state(s). It contains the memory element where previous state is stored. Flipflop is an example based on sequential logic Prepared By: Irfan Khan (Chief Admin) Page 30

31 Q)How to do calculation using Caveman numbers? Caveman is a base 5 number system. It consists of five unique symbols,,>, ῼ and that are used to represent numbers 0, 1, 2, 3, 4 respectively. To represent larger number a combination of symbols is used. For example, to represent the decimal 5, a two number combination of Caveman number system is used. The most significant digit is which is equivalent to decimal 1. The least significant digit is which is equivalent to decimal 0. The five combinations of Caveman numbers having the most significant digit, represent decimal values 5 to 9 respectively. This is similar to the Decimal Number system, where a 2-digit combination of numbers is used to represent values greater then 9. The most significant digit is set to 1 and the least significant digit varies from 0 to 9 to represent the next 10 values after the largest single decimal number digit 9. The Caveman number can be written in expression from based on the base value 5 and weights 5 0, 5 1, 5 2 etc. = * * 5 0 = * 5 + * 1 Replacing the Caveman numbers and with equivalent decimal values in the expression yields; = * * 5 0 = * 5 + * 1 = 9 The number ῼ in decimal is represented in expression from as; = * ῼ * * * 5 0 = * ῼ * 25 + * 5 + * 1 Replacing the Caveman numbers with equivalent decimal values in the expression yields; = (1) * (3) * 25 + (4) * 5 + (0) * 1 = = 220 Lecture no 4 Q)What is the concept of hexadecimal subtraction and addition? Let's tackle subtraction first. Subtraction in hexadecimal works similar to subtraction in decimal. Suppose we want to subtract (in decimal). We write the subtrahend (the number to be subtracted) underneath the minuend (the number to Prepared By: Irfan Khan (Chief Admin) Page 31

32 subtract from), lining up the place values at the decimal point - or at the right if there is no decimal point - like this: Now, starting from the right, we subtract the digits. (Ones place) 6-3 = 3, (tens place) 8-4 = 4, (hundreds place) 5-2 = 3, (thousands place) 1-0 = 1. It looks like this We do the same thing in hexadecimal, except that we occasionally have a digit larger than 9. For example, suppose w e want to subtract 5CD2-2A0 (hexadecimal). As with decimal, we write the subtrahend (the number to be subtracted) underneath the minuend (the number to subtract from), lining up the place values at the radix point - or at the right if there is no radix point - like this: 5CD2 h (The 'h' just indicates a hexadecimal value) - 2A0 h Now, starting from the right, we subtract the digits. 2-0 = 2, D-A = = 3, C-2 = 12-2 = 10 = A, 5-0 = 5. It looks like this: 5CD2 h - 2A0 h A32 h That's fine - until you get a place value in which there's not enough to subtract from. What do we do in decimal? We borrow from the next higher place value. For example, suppose we want to subtract (decimal). We'll align our numbers: Now in the ones place, we can't subtract 6 from 5 (5 is less than 6) so we borrow 1 from the tens place. This gives us 15 (5 plus the 10 we got from the borrow). We now subtract 15-6 = 9: \ \ (There was a 4 and a 5 under the '\'s) Similarly in the tens place, we can't subtract 7 from 3 so we borrow one from the hundreds place. We now subtract 13-7 = 6: Prepared By: Irfan Khan (Chief Admin) Page 32

33 \ \ \ We do the same for the next, borrowing 1 from the thousands, and then subtract the thousands. We end up like this: \ \ \ \ Q)Why did we get 10 from each borrow? Because each time, the next place value was 10 times as large. This is because decimal is base-10. Now let's look at a hexadecimal problem that requires borrowing. For example, suppose we want to subtract A8D2-3EAC (hexadecimal). We'll align our numbers: A 8 D 2 h - 3 E A C h Now in the ones place, we can't subtract C (12) from 2 so we borrow 1 from the second place. Since that has a place value (a "weight") of sixteen, this gives us 18 (2 plus the 16 we got from the borrow). We now subtract = 6: (Note that I use decimal here. Some people write these as Ch and 12h.) A 8 \ \ h (There was a D and a 2 under the '\'s) - 3 E A C h h In second place, we don't need to borrow because we can subtract 10 (A) from 12: A 8 \ \ h - 3 E A C h h In the third place, we again need to borrow. We'll borrow 1 from the 4rth place which gives us 24 (8 plus the 16 from the borrow). We then can subtract = 10 = A. So we have: \ \ \ \ h - 3 E A C h Prepared By: Irfan Khan (Chief Admin) Page 33

34 A 2 6 h Finally, we subtract 9-3 = 6 in the 4096's place: \ \ \ \ h - 3 E A C h A 2 6 h Q)Why did we get 16 from each borrow? Because each time, the next place value was 16 times as large. This is because hexadecimal is base-16. One final note: If the subtrahend (the bottom number) is larger than the minuend (the top number), flip the numbers around and make the final answer negative, just as you would in decimal.all the operations work exactly the same in any base, as long as you use the right tables and remember to use the base when you carry or borrow. For example, here's 25 x 3A (37 x 58 base 10): 25 x 3A A x 5 (10 x 5 = 50) 14 A x 2 (10 x 2 = 20) F 3 x 5 (3 x 5 = 15) 6 3 x 2 (3 x 2 = 6) = 2146 (base 10) I wrote out each product of a pair of digits here, to save carrying, and to show explicitly the four numbers you would get from a multiplication table (though I just multiplied each pair in base 10 and converted to base 16); normally you'd write it as 25 x 3A = F = F Prepared By: Irfan Khan (Chief Admin) Page 34

35 Here, for example, 5 x A = 32, so I put down 2 and carried the 3, which I added to the result of A x 2 = 14 to get 17. When I added the partial products, I found that 7+F = 16, so I put down the 6 and carried the 1. Q) What is The Excess Code? Excess code is a number representation system like any other system. Excess code of any number is obtained by adding some number to it. For example in excess- 3 code, the code for 0 is obtained by adding 3 in 0 as =0011, similarly excess-3 code for 2 is =0101.Similary we can get excess-5 or excess-8 codes. Decimal Excess (-8+8 = 0 ) (-7+8 = 1 ) (-6+ 8 = 2) (-5+8 = 3) (-4+8 = 4) (-3+8 = 5) (-2+8 = 6) (-1+8 = 7) (0+8 = 8) (1+8 = 9) (2+8 = 10) (3+8 = 11) (4+8 = 12) (5+8 = 13) Prepared By: Irfan Khan (Chief Admin) Page 35

36 (6+8 = 14) (7+8 = 15) Q)What is caveman number system? In caveman number system caveman used 5 distinct shapes,,>, ῼ and to represent the numbers from 0 to 4. If you want to convert 13 into caveman number system divide 13 by 5 to get the number of carries then represent them into their respective symbols so answer of 13 is 23( and in caveman it would be as > ῼ ) How and will be converted into binary number and 0.101? In sum of weight method, the highest weight means a value that can be represented in the power of 2 and less than sum term. This method is suitable for only small number. For large number, you can use another method of repeatedly multiplication by 2. 1) Example: Converting decimal into binary Sum Term Highest Weight Binary value Sum term = Sum term - Highest weight (2-1 = 1/2 = 0.500) = 0 In the above example, highest weight for is 2-1, if we will take 2 0 then it will be larger than so we will take highest weight 2-1. Now we will place 1 at the position 1 after decimal point. The process will stop here as the sum term becomes equal to zero. 2) Example: Converting decimal into binary Sum Term Highest Weight Binary value Sum term = Sum term - Highest weight (2-3 = 1/8 = 0.125) = 0 Prepared By: Irfan Khan (Chief Admin) Page 36

37 In the above example, highest weight for is 2-3. Now, we will place 1 at the position 3 in the binary value. The process will stop here as the sum term becomes equal to zero. Decimal to Octal Conversion There are two methods to convert from Decimal to Octal. The first method is the Indirect Method and the second method is the Repeated Division Method. 1. Indirect Method A decimal number can be converted into its Octal equivalent indirectly by first converting the decimal number into its binary equivalent and then converting the binary to Octal. 2. Repeated Division-by-8 Method The Repeated Division Method has been discussed earlier and used to convert Decimal Numbers to Binary and Hexadecimal by repeatedly dividing the Decimal Number by 2 and 16 respectively. A decimal number can be directly converted into Octal by using repeated division. The decimal number is continuously divided by 8 (base value of the Octal number system). Octal Numbers Octal Number system also provides a convenient way to represent long string of binary numbers. The Octal number is a base 8 number system with digits ranging from 0 to 7. Octal number system was prevalent in earlier digital systems and is not used in modern digital systems especially when the Hexadecimal number is available. Each Octal Number digit can represent a 3-bit Binary Number. Prepared By: Irfan Khan (Chief Admin) Page 37

38 Explain implementing an AND Gate using two NAND gates, How can this process implementing. What is Excess COde? Excess code is used to represent numbers in the range +7 to -8. In simple words, we just add 8 (1000) to all the numbers in the range +7 to -8 to represent in excess code. For example, 0000 (0) (8) = 1000 represents 0 in excess code (1) (8) = 1001 represents 1 in excess code (-2) (8) = 0110 represents -2 in excess code (-1) (8) = 0111 represents -1 in excess code. What us Sign-magnitude form? Sign-Magnitude form: Actually in sign-magnitude form, Most Significant bit is used to represent the sign (either +ve or -ve) of a number. If it is 1 then the number is negative, and if it is 0 then the number is positive. Here we are treating with 4 bit numbers, it means that 1st bit will represent the sign and the remaining three bits will represent the magnitude of the number. For example, 1111 means -7 and 0111 means means -6 and 0110 means +6. And so on. (Bits in red color represents the sign of a number) what is 2nd Complement form? 2's Complement form: It is very simple. In 2's complement form the positive numbers are represented in original form, whereas to represent the negative numbers 2's complement is taken. For example, +7 is represented as 0111 and -7 is represented as 1001 (2's complement of 7). +6 is represented as 0110 and -6 is represented as 1010 (2's complement of 6). And so on. Prepared By: Irfan Khan (Chief Admin) Page 38

39 Explain subtraction of Hexadecimal? Borrowing 1 from hexadecimal numbers means borrowing 16, 10 in decimal numbers and 2 in binary numbers. Please carefully check each step of hexadecimal subtraction which is given below Borrow Number1 9 2 B 5 Number 2 2 A C 6 Difference 6 7 E F 21-6 = 15d (decimal) = Fh (hexadecimal) 26-C = 14d (decimal) = Eh (hexadecimal) 17-A = 7d (decimal) =7h (hexadecimal) 8-2 = 6d (decimal) =6h (hexadecimal) Q)Explain NOT gate timing diagram. Lecture no 5 Basically the timing diagram of any gate operation is made according to the value which is given in truth table and it describes the response of the any gate in a certain period of time with respect to the changing input. The timing diagram describes the operation of NOT gate for 7 interval of Prepared By: Irfan Khan (Chief Admin) Page 39

40 time (t0 to t6) and this operation is performed with the help of NOT gate table which is given the input (A) and output (F).Please see the figure 5.11 of handouts which indicates first input A is 0 and F indicates output which is 1. Q) What is diff in single precision and double precision numbers and their definition? The difference between the single precision and double precision is that single is of 32 bits and double is 64 bits and so single precision has less capability to represent values while the double precision has 64 bit with higher capability to represent the more and higher values than 32 bit single precision. While the 1 st bit S is a single bit used to represent sign is always 1 for standard format. Q)why we use logic gates & what is use of them? A logic gate is the basic building block of a digital circuit. A logic gate is used to implement a Boolean function. It performs a logical operation on one or more logical inputs, and produces a single logical output. At any given moment, every terminal is in one of the two binary states: low (0) or high (1), represented by different voltage levels. The logic state of a terminal can change as the circuit processes data. There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR. T Q)what is meant by the implementation of AND gate? Let s take this example for better understanding of AND gate implementation. We can design a digital electronic circuit to make an instant decision based on some information. Here we emphasize instant in the decision making process i.e. the process has no time delay. These condition will be applied X = It is a sunny day? Yes, Y = Is it Sunday or holiday? Yes and Action Z = Go for shopping. The rule is Z = X and Y. The circuit is a simple AND gate implementation. Logic can also be expressed in Truth Table which is given below. X Y Z Prepared By: Irfan Khan (Chief Admin) Page 40

41 (yes) 1(yes) 1(Go for shopping) Q)How to find the output of NAND gate? The output of NAND gate is Low (0) only if both the inputs are High (1). Otherwise the output is High (1). It can be considered as NOT AND gate. It inverts the output of the AND gate. See the difference in both the tables mentioned below. AND Gate A B Output NAND Gate A B Output Prepared By: Irfan Khan (Chief Admin) Page 41

42 Q) What is transistor device? A transistor device composed of semiconductor material that amplifies a signal or opens or closes a circuit. An integrated circuit (IC) consists of active and passive components as well as interconnections and these components include transistors, diodes, capacitors and resistors. For example: The number of transistors used in Intel's current state-of-the-art Pentium 4 microprocessor, which has 42 million transistors and is capable of executing 1.7 billion instructions a second. Explain Implementation of Logic Gate? The practical implementation of the Logic gates is through the Integrated Circuits technologies. Different types of Integrated Circuit technologies are used to implement the digital circuit s e.g. CMOS, TTL, ECL, PMOS, and E2CMOS.CMOS and TTL are the different technologies to implement the digital circuits.binary Coded Decimal (BCD) code is a 4-bit code and is used to represent decimal digits 0 to 9 in binary. Only 1st ten binary values are used to represent decimal values from 0 (0000) to 9 (1001). The remaining six 4-bit combinations 1010, 1011, 1100, 1101, 1110 and 1111 are considered to be invalid and do not exist. To represent decimal number in BCD, we write BCD codes of individual digits. For example, BCD code for 216 is BCD code for 23 is In Binary Coded Decimal (BCD), the adder is actually working in hex, 0xA shows the hexadecimal number and it is not used for multiplication. If the addition of two BCD digits results in an invalid result, the result must be between 0xA (1010) and 0xF (1111). By adding 6 to this value and generating a carry, you generate the proper BCD values: 0xA + 0x6 = 0x10 (the BCD value 10) 0xB + 0x6 = 0x11 (the BCD value 11) etc. So by adding 6 we use the hardware of the computer which is designed for counting in binary to skip over the binary values we won't need because we want to represent digits in BCD.Please also see the example which is mentioned in page: no: 35 of handout. Please try to post only one query in a single post. Prepared By: Irfan Khan (Chief Admin) Page 42

43 Q) Explain Gray Code? Gray code is basically used to refer to a binary sequence in which only a single bit changes value when transitioning between adjacent states. Exclusive-OR method is used to convert binary code to gray code. For example: Firstly Binary number is converted into gray code and then it can be converted into decimal. Please see the table which is given below. Exclusive -OR is applied on binary bits of column A and B and result is placed on column B of Gray code Section. Same procedure is applied on all columns. Binary number system Gray number system Binary section Gray code section Column A Column B Column C Column D Column E Column F Column G Column H How can we calculate Hexadecimal addition and subtraction? We can do hexadecimal addition and subtraction in same way as we do in decimal number system. Two examples are given on the 30 of the handouts. Here in the example of addition at Prepared By: Irfan Khan (Chief Admin) Page 43

44 left most column the values to be added are 5+6 = B because 11= B, next is B+C = 17 for understanding (B = 11 of decimal and C= 12 hence = 23 of decimal cover 23 into hexadecimal by repeated division by 16 you will get 1 as quotient and 7 as remainder so it is 17), 7 will be written and 1 will be taken as carry. () 1+A+2 = D and so on A B C D E F Q)Explain sum of weights? Here we have the decimal value 411, which is to be converted into binary value The above values are used according to the position of the binary bit. So, for 411 the maximum available value is 512 which is greater than 411 obviously we cannot use it. So we take 256 which fall under 411 here now we take = 155 here, in fact now 155 value remains there to be represented in binary. Now for 155 the maximum possible value that fall under it is 128 again we repeat and = 27 and so on. At the end we add the all binary values as given below and wee the sum as result which is binary equivalent of 411 which is shown below SUM Prepared By: Irfan Khan (Chief Admin) Page 44

45 Q)Hexadecimal to decimal conversion using sum of weight method? First understand what each hexadecimal digit stands for. The digits 0 through 9 stand for their decimal counterparts, and A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15. Now suppose we want to convert hexadecimal number B61F.Follow the foolowing steps now. Step1 Write each character multiplied by 16 and separated by +. Bx16 + 6x16 + 1x16 + Fx16 Step2 Write decimal equivalent against each hexa digit 11x16 + 6x16 + 1x x16 Step3 Put power on each 16 starting from 0 from left side. 11x x x x160 Step4 Solve powers and solve = 11x x x x1 Prepared By: Irfan Khan (Chief Admin) Page 45

46 = = So Decimal equivalent to B61F is Q)Decimal to Hexadecimal using Repeated Division by 16 Method? Suppose we have decimal number 845 and we want it into hexadecimal number by repeated division by 16 method. Follow the steps given below. Step1: Divide 845 by 16: The remainder will be 13 which is equal to D in hexadecimal. Step2: Now divide quotient 52 by 16: Remainder will be 4 and quotient would be 3 (Which is less then 16 so further division is not possible) Step3: Now write all remainders in from bottom to top direction as 34D. So hexadecimal equivalent to decimal 845 is 34D (D) 3 4 Prepared By: Irfan Khan (Chief Admin) Page 46

47 Q)What is BJT? Bipolar Junction Transistors BJTs can have two different polarities, NPN and PNP. An NPN BJT is one where a positively-doped (P-type) semiconductor is sandwiched between two negatively-doped (N-type) semiconductors. A PNP BJT is, obviously, one where an N-type semiconductor is sandwiched between two P-types. Both types of BJTs have an exponential dependence between the input voltage and the current output. For the record, I should state that a semiconductor is basically a material with conductance between that of an insulator and a conductor. Silicon and germanium are the two most well-known semiconductors. Also, doping just means the addition of impurities into a semiconducting material in order for it to either: increase its electron acceptance (P-type) or increase its electron conductance (N-type) Q) what is the use of an Integrated Circuit? Large and complex digital system such as a computer is built using combinations of basic Logic Gates such as AND, OR, NOT gates. These basic building blocks are available in the form of Integrated Circuit or ICs. These gates are implemented using standard CMOS and TTL technologies. It saves circuit space and cost. Digital circuits to perform specific functions are available as Integrated Circuits for use. Implementing a Digital system in terms of these dedicated functional units makes the system more economical and reliable. Thus an adder circuit does not have to be implemented by connecting various gates, a standard Adder IC is available that can be readily used. Other commonly used combinational functional devices are Comparators, Prepared By: Irfan Khan (Chief Admin) Page 47

48 Decoders, Encoders, Multiplexers and Demultiplexers. Consider the example of Adder circuit which is a combination of AND, OR and XOR gates. It requires 3 chips to implement Adder circuit. We can implement it by using single chip so the circuit space reduces from 3 chips to 1 chip. Q)What is an inverter? Inverter is a NOT gate. The NOT gate performs logical inverse operation. The NOT gate has single input and a single output. If input is 0 then output will be logic 1. If input is 1 then output will be logic 1. Q)What is CMOS? CMOS: Complementary Metal-Oxide Semiconductor The most extensively used technology, characterized by low power consumption,switching speed which is slower but comparable to TTL. Has higher chip density TTL. Due to high input impedance is easily damaged due to accumulated static charge. Q)What is Carry? Lecture no 7 When we add two binary bits then sum bit and carry bit is generated. The binary addition is identical to decimal addition. For example, when we add 10 and 6 then result is 16 in which 6 is the sum part whereas 1 is carry part. Consider the following example of adding 2 binary numbers Prepared By: Irfan Khan (Chief Admin) Page 48

49 Carry Decimal Equivalent 1 st Number nd Number Result The binary addition starts from adding least significant bits. In the above example, the least significant bit of 1 st number is 0 and least significant bit of 2 nd number is 0. When we add these two bits then sum bit is 0 and carry bit is 0. Now, bits 1 and 1 and carry bit 0 will be added. The result will be 10 in which sum is 0 and carry is 1. Next, bits 0 and 1 and carry bit 1 will be added. The result will be 10 in which sum is 0 and carry is 1. Now, bits 1 and 0 and carry bit 1 will be added. The result will be 10. Q)How can noise effect on CMOS AND circuit? Let consider a noise signal is induced in the circuit of CMOS AND gate. The acceptable output logic level is from 0 to 0.33 for logic 0 and 4.4 to 5 for logic 1. Suppose, when the noise is added to circuit then it drops the output voltage down to 3.4 volts. As the acceptable output voltage for logic 1 is from 4.4 to 5 volts, thus the circuit will malfunction. For better understanding of noise, noise margin and logic levels, read the following concepts. Noise: Noise is an unwanted voltage that is induced in the circuit due to high frequency electromagnetic radiations. The TTL and CMOS circuit operating at +5 or 3.3 Volts respectively are designed to accept voltages in a certain range as logic 1 and 0. These voltage ranges are noise margin. The VIH and VIL indicate the acceptable voltage ranges for the input logic high and low respectively. Similarly VOH and VOL indicate the acceptable output voltage range for logic high and low respectively. These voltage ranges determine the suitability of a gate to work in noisy environments. As long as the input remains in these ranges, the circuit will work properly in the presence of noise. Prepared By: Irfan Khan (Chief Admin) Page 49

50 Logic levels for TTL: If the input voltage is from 0 to 0.8 volts then it will be treated as logic 0. If the input voltage is from 2 to 5 volts then it will be treated as logic 1. If the output voltage is from 0 to 0.4 volts then it will be treated as logic 0. If the input voltage is from 2.4 to 5 volts then it will be treated as logic 1. Logic levels for CMOS 5 Volts series: If the input voltage is from 0 to 1.5 volts then it will be treated as logic 0. If the input voltage is from 3.5 to 5 volts then it will be treated as logic 1. If the output voltage is from 0 to 0.33 volts then it will be treated as logic 0. If the input voltage is from 4.4 to 5 volts then it will be treated as logic 1. Logic levels for CMOS 3.3 Volts series: If the input voltage is from 0 to 0.8 volts then it will be treated as logic 0. If the input voltage is from 2 to 3.3 volts then it will be treated as logic 1. If the output voltage is from 0 to 0.4 volts then it will be treated as logic 0. If the input voltage is from 2.4 to 3.3 volts then it will be treated as logic 1. Noise Margin: Noise margin is a measure of the circuit s immunity to noise. The high-level and low level noise margins are represented by VNH and VNL respectively. VNH = VOH(min) VIH(min) VNL = VIL(max) VOL(max) TTL 5 volt Noise Margins VNH = VOH(min) VIH(min) = = 0.4 v VNL = VIL(max) VOL(max) = = 0.4 v CMOS 5 volt series Noise Margins VNH = VOH(min) VIH(min) = = 0.9 v VNL = VIL(max) VOL(max) = = 1.17 v CMOS 3.3 volt series Noise Margins VNH = VOH(min) VIH(min) = = 0.4 v VNL = VIL(max) VOL(max) = = 0.4 v Prepared By: Irfan Khan (Chief Admin) Page 50

51 Q) What is Logic levels and Noise Margin? Noise is an unwanted voltage that is induced in the circuit due to high frequency electromagnetic radiations. The TTL and CMOS circuit operating at +5 or 3.3 Volts respectively are designed to accept voltages in a certain range as logic 1 and 0. These voltage ranges are noise margin. The VIH and VIL indicate the acceptable voltage ranges for the input logic high and low respectively. Similarly VOH and VOL indicate the acceptable output voltage range for logic high and low respectively. These voltage ranges determine the suitability of a gate to work in noisy environments. As long as the input remains in these ranges, the circuit will work properly in the presence of noise. Logic levels for TTL: If the input voltage is from 0 to 0.8 volts then it will be treated as logic 0. If the input voltage is from 2 to 5 volts then it will be treated as logic 1. If the output voltage is from 0 to 0.4 volts then it will be treated as logic 0. If the input voltage is from 2.4 to 5 volts then it will be treated as logic 1. Logic levels for CMOS 5 Volts series: If the input voltage is from 0 to 1.5 volts then it will be treated as logic 0. If the input voltage is from 3.5 to 5 volts then it will be treated as logic 1. If the output voltage is from 0 to 0.33 volts then it will be treated as logic 0. If the input voltage is from 4.4 to 5 volts then it will be treated as logic 1. Logic levels for CMOS 3.3 Volts series: If the input voltage is from 0 to 0.8 volts then it will be treated as logic 0. If the input voltage is from 2 to 3.3 volts then it will be treated as logic 1. If the output voltage is from 0 to 0.4 volts then it will be treated as logic 0. If the input voltage is from 2.4 to 3.3 volts then it will be treated as logic 1. Noise Margin: Noise margin is a measure of the circuit s immunity to noise. The highlevel and low level noise margins are represented by VNH and VNL respectively. VNH = VOH(min) VIH(min) VNL = VIL(max) VOL(max) TTL 5 volt Noise Margins VNH = VOH(min) VIH(min) = = 0.4 v Prepared By: Irfan Khan (Chief Admin) Page 51

52 VNL = VIL(max) VOL(max) = = 0.4 v CMOS 5 volt series Noise Margins VNH = VOH(min) VIH(min) = = 0.9 v VNL = VIL(max) VOL(max) = = 1.17 v CMOS 3.3 volt series Noise Margins VNH = VOH(min) VIH(min) = = 0.4 v VNL = VIL(max) VOL(max) = = 0.4 v Q)What is Binary Addition and Binary Subtraction? Binary Addition When we add two binary bits then sum bit and carry bit is generated. The binary addition is identical to decimal addition. For example, when we add 10 and 6 then result is 16 in which 6 is the sum part whereas 1 is carry part. Consider the following example of adding 2 binary numbers Carry Decimal Equivalent 1 st Number nd Number Result Prepared By: Irfan Khan (Chief Admin) Page 52

53 The binary addition starts from adding least significant bits. In the above example, the least significant bit of 1 st number is 0 and least significant bit of 2 nd number is 0. When we add these two bits then sum bit is 0 and carry bit is 0. Now, bits 1 and 1 and carry bit 0 will be added. The result will be 10 in which sum is 0 and carry is 1. Next, bits 0 and 1 and carry bit 1 will be added. The result will be 10 in which sum is 0 and carry is 1. Now, bits 1 and 0 and carry bit 1 will be added. The result will be 10. Binary Subtraction In binary number system, when we borrow a number then it is actually 2 (binary 10) just like in decimal number system the borrow taken is 10. Consider the following example of subtracting 2 binary numbers Borrow 1 Decimal Equivalent 1st Number nd Number Result The subtraction starts from least significant bits. In the above example, the least significant bit of first number is 0 and least significant bit of second number is 1. The bit 0 is less than 1 and cannot be subtracted therefore a borrow is taken preceding bit. The borrow taken is 10 (binary number). Now, 10 will be subtracted from 1 which gives the result 10 1 = 1. Next, bits 1 and 0 will be subtracted. As a borrow has already been taken from the preceding bit of first number therefore it is left as 0. Now, bit 0 of first number and bit 0 of second Prepared By: Irfan Khan (Chief Admin) Page 53

54 number will be subtracted which gives the result 0 0 = 0. Next, bit 1 of first number and bit 1 of second number will be subtracted which gives the result 1 1 = 0. Next, bit 1 of first number and bit 0 of second number will be subtracted which gives the result 1 0 = 1. The decimal equivalent of binary number means the decimal number obtained after converting binary number into decimal number. In the above example, the decimal equivalent of binary number 1110 is = = = 14 Noise Margin Noise margin is a measure of the circuit s immunity to noise. The high-level and low-level noise margins are represented by VNH and VNL respectively. VNH = VOH(min) VIH(min) VNL = VIL(max) VOL(max) CMOS 5 volt series Noise Margins VNH = VOH(min) VIH(min) = = 0.9 v VNL = VIL(max) VOL(max) = = 1.17 v CMOS 3.3 volt series Noise Margins VNH = VOH(min) VIH(min) = = 0.4 v VNL = VIL(max) VOL(max) = = 0.4 v TTL 5 volt Noise Margins VNH = VOH(min) VIH(min) = = 0.4 v VNL = VIL(max) VOL(max) = = 0.4 v Prepared By: Irfan Khan (Chief Admin) Page 54

55 Q)What is Power Dissipation Logic Gates and Logic circuits consume varying amount of power during their operation. Ideally, logic gates and logic circuit should consume minimal power. Advantages of low power consumption are circuits that can be run from batteries instead of mains power supplies. Thus portable devices that run on batteries use Integrated circuits that have low power dissipation. Secondly, low power consumption means less heat is dissipated by the logic devices; this means that logic gates can be tightly packed to reduce the circuit size without having to worry about dissipating the access heat generated by the logic devices. Microprocessors for example generate considerable heat which has to be dissipated by mounting small fans. Generally, the Power dissipation of TTL devices remains constant throughout their operation. CMOS device on the other hand dissipate varying amount power depending upon the frequency of operation Q)What is (SPP)? An important parameter is the Speed-Power Product which is used as a measure of performance of a logic circuit taking into account the propagation delay and the power dissipation. The SPP = tppd expressed in Joules (J), the unit of energy. Lower the SP product better is the performance. Q)What is Fan-out? The maximum number of gates that can be connected to the output of a single gate is referred to as Fan-Out. The fan-out is the number of gates that are connected to the output of the driving gate. Fan-out leads to increase capacitive load on the driving gate and therefore longer propagation delay and when an input signal of a logic gate is changed, there is a propagation delay before the output of the logic gate changes. This is due to capacitive loading at the output. Q)What is TTL? Prepared By: Irfan Khan (Chief Admin) Page 55

56 The practical implementation of the Logic gate is through the Integrated Circuits technologies and different types of Integrated Circuit technologies are used to implement the digital circuit s e.g. CMOS, TTL, ECL, PMOS, E2CMOS. TTL stands for transistor transistor logic. It is a class of digital circuits built from bipolar junction transistors and resistors and it is used in many applications such as computers, industrial controls, test equipment and instrumentation etc. Q)What is Parity? Lecture no 8 Parity is used to detect even number of 1's or odd number of 1's in any binary sequence. Even parity bit is used to make number of 1's even in any binary sequence and Odd parity bit is used to make number of 1's odd in any binary sequence. For example in binary sequence Number of 1's is 7 which an odd number so odd parity bit will be 0 and even parity bit will be 1( because we want to make number of 1's even in even parity method. Q)What is NPN Transistor? There are two types of transistors NPN(P-Type material is sandwiched in two N-type material) and PNP(N- Type material is sandwiched in two P-type material). It works just like a switch i.e At some conditions current flow through it and we call it as ON and on some conditions current don't flow through it this is called OFF condition. Prepared By: Irfan Khan (Chief Admin) Page 56

57 Q)How can we identify the sop and pos? An expression which contains minterms or product terms in which minterms are summed together is called SOP expression whereas an expression which contains maxterms or sum terms in which maxterms are multiplied together is called POS expression. Minterms are the product terms whereas Maxterms are the sum terms. The following is an SOP expression which contains minterms 2, 4 and 6. In the expression given below, minterms have been summed together. A BC + AB C + ABC The following is a POS expression which contains maxterms 1, 3, 5 and 7. In the expression given below, maxterms have been multiplied together. (A+B+C )(A+B +C )(A +B+C )(A +B +C ) Q) What is mantissa and biased exponent? Mantissa represents the magnitude of number. The Biased exponent value is used to represent negative exponents. In 15 digit floating point representation, the biased value 50 is added to exponent value. The highest exponent value that can be represented is 49 (49+50 = 99) and the smallest exponent value that can be represented is -50 ( = 0). As in 15 digit floating point representation, the exponent fields of 2 digits therefore the largest value must be 99. Q)What is parity method and what is even parity and odd parity? Parity method is used to detect errors while transmitting information from one end to other end. There are two methods: even parity bit method and odd parity bit method. An extra bit is appended at the end of binary information to detect error. We can use both even parity and odd parity method to detect errors. Even parity method: With even parity bit method, the total number of 1s is counted to make it equal to even number of 1s. If the number of 1s is even then appended bit is 0 otherwise the appended bit is 1 so that total number of 1s become even. Prepared By: Irfan Khan (Chief Admin) Page 57

58 For example, 8 bit binary information to be transmitted is The total number of 1s in the 8 bit binary information is odd so we append 1 at the end of information to make it equal to even number of 1s such as Similarly, if the 8 bit binary information is then we append 0 at the end of information to make the number of 1s equal to even such as Odd parity method: With odd bit parity method, the total number of 1s is counted to make it equal to odd number of 1s. If the number of 1s is odd then appended bit is 0 otherwise the appended bit is 1 so that total number of 1s becomes odd. For example, 8 bit binary information to be transmitted is The total number of 1s in the information is odd so we append 0 at the end of binary information to make it equal to odd number of 1s such as Similarly, if the 8 bit binary information is then we append 1 at the end of binary data to make the number of 1s equal to odd such as Q) what is the purpose of Boolean Algebra? Boolean algebra is the mathematics of Digital Systems therefore digital systems work on the basis of Boolean algebra. Digital circuits are made from the combination of logic gates which performs Boolean logic operation such as AND, OR and NOT operation. Logic gates are the basic building block of digital systems which performs Boolean logic operation on one or more logic inputs and produces a single logic output. Digital circuits are made from the combination of logic gates such as AND, OR, NOT gates. AND gate performs logical multiplication operation. It gives output 1 when all inputs are logic 1 whereas it gives output 0 when any of the input is 0. OR gate performs addition operation. It gives output 1 when any of the input is 1 whereas it gives output 0 when all inputs are 0. NOT gate performs inversion operation. If input is 1 then output is 0 and if input is 0 then output is logic 1. Prepared By: Irfan Khan (Chief Admin) Page 58

59 Q)Boolean Algebra Definitions 1. Variable A variable is a symbol usually an uppercase letter used to represent a logicalquantity. A variable can have a 0 or 1 value. 2. Complement A complement is the inverse of a variable and is indicated by a bar over the variable. Complement of variable X is X. If X = 0 then X = 1 and if X = 1 then X= Literal A Literal is a variable or the complement of a variable. Q)Standard Form of Boolean Expressions? All Boolean expressions can be converted into and represented in one of the two standard forms. Sum-of-Products form Product-of-Sums form 1. Sum of Product form When two or more product terms are summed by Boolean addition, the result is a Sum-of-Product or SOP expression. AB + ABC ABC + CDE + BCD AB + ABC + AC The Domain of an SOP expression is the set of variables contained in the expression, both complemented and un-complemented. A SOP expression can have a single variable term such as A. A SOP expression can not Prepared By: Irfan Khan (Chief Admin) Page 59

60 have a term of more than one variable having an over bar extending over the entire term, such asab + C. 2. Product of Sums form When two or more sum terms are multiplied by Boolean multiplication, the result is a Product-of-Sum or POS expression. (A + B)(A + B + C) (A + B + C)(C + D + E)(B + C + D) (A + B)(A + B + C)(A + C) The Domain of a POS expression is the set of variables contained in the expression, both complemented and un-complemented. A POS expression can have a single variable term such as A. A POS expression can not have a term of more than one variable having an over bar extending over the entire term such as (A +B)(A +B + C) Q)What is range of Signed forms? Basically 2 s complement form is used to represent signed numbers. E.g. 2 s complement representation +13 is represented as and -13 is represented as All negative numbers are represented in their 2 s complement form and all positive numbers are represented in their actual form. For example: 0111 The actual binary number of 7 (MSB set to 0 indicates a positive number) 1000 Using 1 s complement of 7, all bits are inverted (0 to 1 or 1 to 0) + 1 Adding 1 in inverted binary numbers (2 s complement) 1001 this binary number represents -7 (MSB set to 1 indicates a negative number) Prepared By: Irfan Khan (Chief Admin) Page 60

61 Q)Rule No 11 and 12 of Boolean Algebra? Please check it all steps and comments. Hope you can understand better. 11. A + A.B = A.1 + A.B according to Rule 2: (B+1) = 1,So replaced 1 to (B+1) = A(B+1) + A.B = AB +A + A.B = B(A+ A ) +A according to Rule 6 : A + A = 1 = B + A 12. (A+B).(A+C) = AA+AC+AB+BC applying the Distributive Law(multiply each variable to each variable of next block ) = A(1+C+B) +BC common A and then will be 1 according to Rule 2: (1+B+C) = 1 = A+BC Q)How can be written *10 power 3? When the decimal point is moved left side of the magnitude of the number so that the positive number is added and when it is moved right side it is added negative number in exponent part. For example the magnitude of the number is It can be written as x 10 3.When this decimal point is moved to the extreme left of the number it can be written as x = x Lecture no 9 Q) What is a canonical sum and canonical product forms? Prepared By: Irfan Khan (Chief Admin) Page 61

62 An expanded form of Boolean expression, where each term contains all Boolean variables in their true or complemented form, is also known as the canonical form of the expression. Canonical form is also known as standard form. Q)SOP and Pos conversion? SOP and Pos conversion? When two or more product terms are summed by Boolean addition, the result is a Sumof-Product or SOP expression. When two or more sum terms are multiplied by Boolean multiplication, the result is a Product-of-Sum or POS expression. Any logical expression can be converted into SOP form by applying techniques of Boolean Algebra. Q) How we can make borrow column in binary subtraction? Let's first look at an easy example Note that the difference is the same if this was decimal subtraction. Prepared By: Irfan Khan (Chief Admin) Page 62

63 Concept of "borrowing" Is similar as it is in decimal number system Watch as "borrowing" occurs when a larger digit, say 8, is subtracted from a smaller digit, say 5, as shown below in decimal subtraction is borrowed from the "tens" (i.e. 101) column for use in the "ones" column, leaving the "tens" column with only 2. The following examples show "borrowing" in binary subtraction In the above example 0 is smaller then 1 so 21 is borrowed now 0 zero become 2, 1 is subtracted from it. Now look at another example Prepared By: Irfan Khan (Chief Admin) Page 63

64 Q) What is Standard and non Standard forms? If every term in the expression contains all the variables (either in complemented or noncomplemented form) used in the expression then it is considered to be in Standard form. Otherwise it will not be in the Standard form. For example, consider an expression AB + AC. It is clear that the expression depends on Prepared By: Irfan Khan (Chief Admin) Page 64

65 three variables A, B and C, but first term is missing C and 2nd term is missing B. So it is in non-standard form. Consider another expression A'BC + ABC'. It is standard SOP expression, as every term contains all the three variables used (either in complemented or non-complemented form). Q) How you have found the binary values of the expressions? In SOP form, A represents 1 and A represents 0. For example, ABC = 110 A B C = 001 In POS form, A represents 0 and A represents 1. For example, A+B+C = 001 A +B +C = 110 Q) How to convert non standard to standard form? A non standard SOP is converted into a standard SOP by using the rule A + A = 1. Consider a three variable expression, AC + AB + A BC. First term AC is missing the variable B, so Prepared By: Irfan Khan (Chief Admin) Page 65

66 multiply it with (B+B ). The second term AB is missing the variable C, so multiply it with (C+C ). The third term A BC contains all the three variables so it remains unchanged. We get then, AC(B+B ) + AB (C+C ) + A BC = ABC + AB C + AB C + AB C + A BC = ABC + AB C + AB C + A BC Q) Conversion from POS to SOP? The conversion from POS form to SOP and from SOP form to POS becomes simpler, if the expressions are represented in Standard forms. It makes the simplification of Boolean expression quite easy. Normally we use K-map for simplification of expressions, and it is better to convert the expression in Standard form before mapping into the K-map. Mapping the Standard expressions in K-map reduces the chances of error (K-map is discussed in lesson 10). In PLD programming, a function represented by an expression in Standard SOP form can be easily programmed. Prepared By: Irfan Khan (Chief Admin) Page 66

67 Conversion: A non standard SOP is converted into a standard SOP by using the rule A + A = 1. Consider a three variable expression, AC + AB + A BC. First term AC is missing the variable B, so multiply it with (B+B ). The second term AB is missing the variable C, so multiply it with (C+C ). The third term A BC contains all the three variables so it remains unchanged. We get then, AC(B+B ) + AB (C+C ) + A BC = ABC + AB C + AB C + AB C + A BC = ABC + AB C + AB C + A BC A non standard POS is converted into a standard POS by using the rule AA = 0. Lecture no 10 Q)If 66 and 67 are decimal numbers. then we can say that 66 is non positional and 67 is positional number. if no then why? Give reasons. Also give some examples of positional and non positional number system. The positional system is based on exactly where the numbers are in the sequence of numbers and the decimal number system is a positional number system as the position of a digit represents its true magnitude as compared to non-positional number systems where the position of the number is not determining factor. For Example: 66 and 67 are decimal positional numbers. The left most digit has the highest weight and the right most digit has the lowest weight. 66 and 67 can be written in the form of an expression in terms of the base value of the number system and weights x x 10 0 = = 66 Prepared By: Irfan Khan (Chief Admin) Page 67

68 2. 6 x x 10 0 = = 67 An example of the non-positional systems is the roman numerals Q)Why and when we use don't care condition in truth table? They don't care conditions are the conditions which never occur. In some situation, it may possible that some input combinations never occur. As these input combinations never occur so the output of these input combinations will be marked as which means output can be 0 or 1 as it is not affected by such input combinations. For example, BCD code is a 4-bit code and may have 16 possible input combinations. The BCD code represents first 10 decimal digits (0-9). The remaining 6 input combinations (1010, 1011, 1100, 1101, 1110, 1111) are considered to be invalid and never occur so these input combinations are don't care conditions. In the k-map, these input combinations will be marked as which can have binary value 0 or 1 depending on the expression. It helps to simplify the Boolean expression using k-map. During grouping process, it can be assigned value 0 or 1. The figure of handouts represents the k-map of Odd-Parity checker which checks the numbers between 0 and 8. The inputs 9 to 15 never occur therefore these are don t care conditions. The odd parity numbers from 0 to 8 are 0001 (decimal 1), 0011 (3), 0101 (5) and 0111 (7). These inputs conditions will have output 1 in the k-map. Other input conditions 0000 (0), 0010 (2), 0100 (4), 0110 (6) and 1000 (8) will have output 0 in k-map. As the inputs 9 to 15 are don t care conditions therefore will be placed in these cells. AB\CD Prepared By: Irfan Khan (Chief Admin) Page 68

69 Q) What is the difference between BCD and excess code? Binary Coded Decimal (BCD) code is used to display decimal digits on 7-Segment Display panels. It is a 4-bit binary code. As you know, there are total 16 combinations of 4-bits but decimal digits are from 0 to 9. So, only first 10 combinations of 4-bits are valid BCD codes. The rest of six combinations 1010, 1011, 1100, 1101, 1110 and 1111 are not valid. Excess code is a biased code which provides a uniform scale for representing positive and negative numbers. With excess code, a pre-specified value is added to original number. For example in Excess- 8 code, we add 8 to the original number. So, we can also represent negative numbers with it. The Excess-8 code is a 4-bit code. The binary code 0000 is assigned to -8 (smallest number in the range) whereas 1111 is assigned to +7 (highest number in the range). The number 8 is added to all digits (+7 to -8) to get the excess code. Decimal Number Excess Code Decimal Number Excess Code (0+8 = 8) ( = 7) (1+8 = 9) ( = 6) (2 + 8 = 10) ( = 5) (3 + 8 = 11) ( = 4) (4 + 8 = 12) ( = 3) (5 + 8 = 13) ( = 2) (6 + 8 = 14) ( = 1) (7 + 8 = 15) ( = 0) A number system has unique symbols, like Decimal number system has symbols 0 to 9. Binary number system has only two symbols, 0 and 1. Excess, BCD and Gray code all use Binary number system but with some restrictions. Q)Simplification of SOP expressions using the Karnaugh Map SOP expressions can be very easily simplified using the K-Map method. In the first step of the simplification process, the SOP expression is mapped on the K-map. In the next step, groups of 1s are formed starting with the largest group of 1s. The group should be of size 2, 4, 8, 16 etc. having adjacent 1s. Multiple (unique) groups of 1s are formed. All the groups formed can either be separate groups or they could share common Prepared By: Irfan Khan (Chief Admin) Page 69

70 1s each having at least a single 1 that is not common to any other group. A single 1 that is not adjacent to any other 1 is considered as a group having only a single cell. Q)Segment Display Lecture no 11 Segment Display is used to display the decimal numbers 0 to 9. A 7-segment display digit has 7 segments a, b, c, d, e, f and g that are turned on/off by a digital circuit depending upon the number that is to be displayed. Different set of segments have to be turned on to display different digits. Forexample, to display the digit 3, segments a, b, c, d and g have to be turned on. To display the digit 7, segments a, b and c have to be turned on. Q)Functions having multiple outputs Boolean functions it has been assumed that Logic Circuits have multiple inputs and single output. Practical Logic circuits however, have multiple inputs and multiple outputs. Circuits having a single output or multiple outputs are treated in the same manner. Circuits having multiple outputs are represented by multiple function tables one for each output or a single function table having multiple output columns. The example of a BCD to 7-Segment Decoder circuit which has 4 inputs and 7 outputs is considered to explain functions having multiple outputs. Q)What is 7-segment display Prepared By: Irfan Khan (Chief Admin) Page 70

71 A 7-segment display is a group of light emitting diodes (LEDs) arrangement.7- Segment display is used to display the decimal numbers 0 to 9 and it has 7 segments a, b, c, d, e, f and g that are turned on or off by a digital circuit depending upon the number that is to be displayed. It is widely used in digital clocks, electronic meters and other electronic devices for displaying numerical information. Lecture no 12 Q)What is Comparator? A comparator circuit compares two numbers and sets one of its three outputs to 1 indicating the result of the comparison operation. A Comparator circuit has multiple inputs and three outputs. A 2-bit Comparator circuit compares two 2-bit numbers A and B. The comparator circuit has three outputs. It sets the A>B output to 1 if A>B. It sets the A=B output to 1 if A=B and sets A<B output to 1 if A < B. The output A>B is set to 1 when the input combinations are 01 00, 10 00, 10 01, 11 00, and The output A=B is set to 1 when the input combinations are 00 00, 01 01, and The output A<B is set to 1 when the input combinations are 00 01, 00 10, 00 11, 01 10, and Prepared By: Irfan Khan (Chief Admin) Page 71

72 Q)What is Comparator Circuit? A 2-bit Comparator circuit that compares two 2-bit numbers A and B and activates one of its three outputs A>B, A=B and A<B depending upon the magnitudes of the numbers A and B has been discussed earlier. The function outputs of the three outputs A>B, A=B and A<B can easily be represented using truth tables which can then be written in a simplified Boolean expression form after simplifying the three function expressions using 4-variable Karnaugh maps. A comparator circuit that compares two 3-bit numbers A and B instead of the 2- bit numbers has an input of 6-bits, which represents an input combination of 64. Writing a truth table and simplifying the three expressions using the 6-variable Karnaugh maps becomes unmanageable. A program based Quine-McCluskey method can easily handle expression of 6 variables represented in the Canonical form (8,16,17,24,...) A,B,C,D,E,F Σ Q)Odd-Prime Number Detector? A circuit that detects Odd Prime numbers between 0 and 9 has been considered earlier. The circuit is to be improved to detect Odd Prime numbers for a decimal number range represented by 5-bit binary numbers or in terms of decimal numbers between the decimal number range 0 to 31. Writing out a function table to represent the 32 input combinations and their corresponding outputs, and then simplifying the function expression using a 5-varaibale K-map can take up considerable amount of time. Quine-McCluskey method can be used to easily simplify the 5-variable Boolean expression represented in Canonical Sum form as (1,3,5,7,11,13,17,19,23,29,31) A,B,C,D,E Σ. The minterms 1, 3, 5, 7, 11, 13, 17, 19, 23, 29 and 31 represent the 5-bit input combinations (decimal numbers) which are Odd and Prime numbers Prepared By: Irfan Khan (Chief Admin) Page 72

73 Q)Explain topic Function table of a comparator circuit? Basically a comparator circuit compares two numbers and it has multiple inputs and three outputs. There are three rules to set which is given below and it is also mentioned in handouts. 1. The output A>B is set to 1 when the input combinations are 01 00, 10 00, 10 01, 11 00, and The output A=B is set to 1 when the input combinations are 00 00, 01 01, and The output A<B is set to 1 when the input combinations are 00 01, 00 10, 00 11, 01 10, and In function table.it is provided 16 different inputs and output is given after comparison; if it is true according to above given rules then output is set 1 otherwise set 0. Prepared By: Irfan Khan (Chief Admin) Page 73

74 Q) Explanation of kmapping? Karnuagh map method becomes difficult to manage when numbers of variables exceed 4.so quine-mccluskey method is used. In table 12.4 when comparing minterms the rule is to compare each minterm in one group with each minterm in the other group.basically comparison is used to eliminate common variables.for example Please see table which is given below to compare 1 with 6, in this table three values are different but we want only to eliminate single variable which is different and all rest values should be common so ignore this camparison and it will get only those camparison which has only single value eliminate like terms 1 and 3 forms a single term eliminating variable C,forming the product term A B D. The comparison terms 1 and 3 are marked as used in table Similarly, terms 1 and 9 form a single term eliminating variable A, forming the product term B C D. Minterm A B C D Explain? (A>B)=A1B1'+A0B1'B1'+A1A0B0' (A<B)=A1'B1+A1'A0'B0+A0'B1B0 Basically a comparator circuit compares two numbers and it has multiple inputs and three outputs. There are three rules to set which is given below and it is also mentioned in Prepared By: Irfan Khan (Chief Admin) Page 74

75 handouts. 1. The output A>B is set to 1 when the input combinations are 01 00, 10 00, 10 01, 11 00, and The output A=B is set to 1 when the input combinations are 00 00, 01 01, and The output A<B is set to 1 when the input combinations are 00 01, 00 10, 00 11, 01 10, and In function table.it is provided 16 different inputs and output is given after comparison. In comparison, when it is true according to above given rules then output is set 1 otherwise set 0. In table 12.5 there are 6 product terms of two variables each. Therefore the terms B D,AC,CD,BC,AD and AB are considered to be Prime Implicants. Exhaustive search for finding prime implicants has not completed. The three variable terms in table 12.4 are compared to eliminate another single variable. All terms that combine to eliminate a variable are represented in table In table 12.6,circles are marked in cells having x, which represent minterms covered by only a single Prime Impicant (means single cross represent in column).thus the minterms 1, 6 and 8 are covered by only the Prime Implicants B D, AC and BC respectively. What is Combinational Logic? Lecture no 13 Prepared By: Irfan Khan (Chief Admin) Page 75

76 Individual gates AND, OR and NOT, NAND and NOR Universal Gates and XORand XNOR gates perform unique functions. These gates in their individual capacity can not perform any useful function. The Logic Gates have to be connected together in different combinations to form Logic Circuits that are able to perform some useful operation like addition, comparison etc. These combinations of gates which results in a circuit used to perform some function are known as Combinational Logic. The function of any Digital Logic circuit is represented by Boolean expressions.in the examples discussed earlier, Boolean expressions for various functions have been determined. Two forms of representing functions through Boolean expressions are the SOP and POS expressions. These two types of Boolean expressions are implementedusing a combination of gates to form Combinational Logic Circuits. Q) Explain QuinMcCluskey simplification method? The Quin McCluskey method is suitable for the simplification of Boolean expression having more than 4 variables. K-map is not much suitable for Boolean expression having more than 4 variables therefore Quin McCluskey method is used in such situation. This method is based on exhaustive search. It is a two step method. In the first step prime implicants are found by exhaustive search. In the second step, minimal prime implicants are found. Prepared By: Irfan Khan (Chief Admin) Page 76

77 Q) How to Adding two BCD numbers? 1.Adding15and is not a valid BCD number. So we will add 0110 in it is the carry. Add carry in 0010 above (left most digit) So final answer is, (32) 2. Adding 38 and Prepared By: Irfan Khan (Chief Admin) Page 77

78 is not a valid BCD number. So we will add 0110 in it is the carry. Add carry in 0111 above So final answer is, (81) Q) Explain operation of Adjacent 1,s Detector circuit? The Adjacent 1s Detector circuit takes 4-bit input and if two adjacent 1s are detected then the output is set to high. As input is of 4-bits, therefore 2 4 (16) different combinations can be applied at input and output is high only when adjacent 1s are detected at input. In table 13.6, 16 different possible inputs and their respective Prepared By: Irfan Khan (Chief Admin) Page 78

79 outputsare For example, 0110 has two adjacent 1s so output is high, whereas 0101 has not adjacent 1s so output is low. Lecture no 14 Q)Half Adder and Full Adder? A single bit binary adder circuit basically adds two bits and a carry bit, generated by the addition of the least significant bits. The output of the single bit adder circuit generates a sum bit and a carry bit. A single digit binary adder circuit therefore has three inputs, one representing single bit number A, the other representing the single bit number B and the third bit represents the single bit carry. The single bit binary adder has two bit output. One bit represents the Sum between numbers A and B. The other bit represents the carry bit generated due to addition. In Digital logic terminology the adder which has been described is known as a full adder. An adder circuit that only has two bit input representing the two single bit numbers A and B and does not have the carry bit input from the least significant digit is regarded as a half-adder. The block diagrams represent a Half-Adder and a Full-Adder Prepared By: Irfan Khan (Chief Admin) Page 79

D I G I T A L C I R C U I T S E E

D I G I T A L C I R C U I T S E E D I G I T A L C I R C U I T S E E Digital Circuits Basic Scope and Introduction This book covers theory solved examples and previous year gate question for following topics: Number system, Boolean algebra,

More information

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii) CONTENTS Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii) CHAPTER 1: NUMBER SYSTEM 1.1 Digital Electronics... 1 1.1.1 Introduction... 1 1.1.2 Advantages of Digital Systems...

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) END-TERM EXAMINATION DECEMBER 2006 Exam. Roll No... Exam Series code: 100919DEC06200963 Paper Code: MCA-103 Subject: Digital Electronics Time: 3 Hours Maximum

More information

DIGITAL ELECTRONICS. Vayu Education of India

DIGITAL ELECTRONICS. Vayu Education of India DIGITAL ELECTRONICS ARUN RANA Assistant Professor Department of Electronics & Communication Engineering Doon Valley Institute of Engineering & Technology Karnal, Haryana (An ISO 9001:2008 ) Vayu Education

More information

Question No: 1 ( Marks: 1 ) - Please choose one A SOP expression is equal to 1

Question No: 1 ( Marks: 1 ) - Please choose one A SOP expression is equal to 1 ASSALAM O ALAIKUM all fellows ALL IN ONE Mega File CS302 Midterm PAPERS, MCQz & subjective Created BY Farhan& Ali BS (cs) 3rd sem Hackers Group Mandi Bahauddin Remember us in your prayers Mindhacker124@gmail.com

More information

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014 Problem 1 (4 parts, 21 points) Encoders and Pass Gates Part A (8 points) Suppose the circuit below has the following input priority: I 1 > I 3 > I 0 > I 2. Complete the truth table by filling in the input

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted

More information

CHW 261: Logic Design

CHW 261: Logic Design CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER

More information

Get Free notes at Module-I One s Complement: Complement all the bits.i.e. makes all 1s as 0s and all 0s as 1s Two s Complement: One s complement+1 SIGNED BINARY NUMBERS Positive integers (including zero)

More information

Boolean Algebra and Logic Gates

Boolean Algebra and Logic Gates Boolean Algebra and Logic Gates Binary logic is used in all of today's digital computers and devices Cost of the circuits is an important factor Finding simpler and cheaper but equivalent circuits can

More information

Chapter 1 Review of Number Systems

Chapter 1 Review of Number Systems 1.1 Introduction Chapter 1 Review of Number Systems Before the inception of digital computers, the only number system that was in common use is the decimal number system which has a total of 10 digits

More information

MACHINE LEVEL REPRESENTATION OF DATA

MACHINE LEVEL REPRESENTATION OF DATA MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems

More information

EE292: Fundamentals of ECE

EE292: Fundamentals of ECE EE292: Fundamentals of ECE Fall 2012 TTh 10:00-11:15 SEB 1242 Lecture 22 121115 http://www.ee.unlv.edu/~b1morris/ee292/ 2 Outline Review Binary Number Representation Binary Arithmetic Combinatorial Logic

More information

Number Systems CHAPTER Positional Number Systems

Number Systems CHAPTER Positional Number Systems CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 1 Modified by Yuttapong Jiraraksopakun Floyd, Digital Fundamentals, 10 th 2008 Pearson Education ENE, KMUTT ed 2009 Analog Quantities Most natural quantities

More information

Digital Systems and Binary Numbers

Digital Systems and Binary Numbers Digital Systems and Binary Numbers Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National University Prof. Wangrok Oh(CNU) 1 / 51 Overview 1 Course Summary 2 Binary Numbers 3 Number-Base

More information

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010 // EE : INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN Lecture : Introduction /9/ Avinash Kodi, kodi@ohio.edu Agenda Go over the syllabus Introduction ti to Digital it Systems // Why Digital Systems?

More information

Number Systems. Both numbers are positive

Number Systems. Both numbers are positive Number Systems Range of Numbers and Overflow When arithmetic operation such as Addition, Subtraction, Multiplication and Division are performed on numbers the results generated may exceed the range of

More information

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

DIGITAL SYSTEM DESIGN

DIGITAL SYSTEM DESIGN DIGITAL SYSTEM DESIGN UNIT I: Introduction to Number Systems and Boolean Algebra Digital and Analog Basic Concepts, Some history of Digital Systems-Introduction to number systems, Binary numbers, Number

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

BINARY SYSTEM. Binary system is used in digital systems because it is:

BINARY SYSTEM. Binary system is used in digital systems because it is: CHAPTER 2 CHAPTER CONTENTS 2.1 Binary System 2.2 Binary Arithmetic Operation 2.3 Signed & Unsigned Numbers 2.4 Arithmetic Operations of Signed Numbers 2.5 Hexadecimal Number System 2.6 Octal Number System

More information

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0 1. The number of level in a digital signal is: a) one b) two c) four d) ten 2. A pure sine wave is : a) a digital signal b) analog signal c) can be digital or analog signal d) neither digital nor analog

More information

Chapter 2: Number Systems

Chapter 2: Number Systems Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This two-valued number system is called binary. As presented earlier, there are many

More information

Logic design Ibn Al Haitham collage /Computer science Eng. Sameer

Logic design Ibn Al Haitham collage /Computer science Eng. Sameer DEMORGAN'S THEOREMS One of DeMorgan's theorems stated as follows: The complement of a product of variables is equal to the sum of the complements of the variables. DeMorgan's second theorem is stated as

More information

Computer Logical Organization Tutorial

Computer Logical Organization Tutorial Computer Logical Organization Tutorial COMPUTER LOGICAL ORGANIZATION TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Computer Logical Organization Tutorial Computer

More information

CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq

CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq CS 121 Digital Logic Design Chapter 1 Teacher Assistant Hadeel Al-Ateeq Announcement DON T forgot to SIGN your schedule OR you will not be allowed to attend next lecture. Communication Office hours (8

More information

Digital Systems and Binary Numbers

Digital Systems and Binary Numbers Digital Systems and Binary Numbers Mano & Ciletti Chapter 1 By Suleyman TOSUN Ankara University Outline Digital Systems Binary Numbers Number-Base Conversions Octal and Hexadecimal Numbers Complements

More information

This tutorial gives a complete understanding on Computer Logical Organization starting from basic computer overview till its advanced architecture.

This tutorial gives a complete understanding on Computer Logical Organization starting from basic computer overview till its advanced architecture. About the Tutorial Computer Logical Organization refers to the level of abstraction above the digital logic level, but below the operating system level. At this level, the major components are functional

More information

EE 8351 Digital Logic Circuits Ms. J.Jayaudhaya, ASP/EEE

EE 8351 Digital Logic Circuits Ms. J.Jayaudhaya, ASP/EEE EE 8351 Digital Logic Circuits Ms. J.Jayaudhaya, ASP/EEE Numbering Systems Types Of Numbers Natural Numbers The number 0 and any number obtained by repeatedly adding a count of 1 to 0 Negative Numbers

More information

1. Mark the correct statement(s)

1. Mark the correct statement(s) 1. Mark the correct statement(s) 1.1 A theorem in Boolean algebra: a) Can easily be proved by e.g. logic induction b) Is a logical statement that is assumed to be true, c) Can be contradicted by another

More information

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

10.1. Unit 10. Signed Representation Systems Binary Arithmetic 0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system

More information

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1.1 Introduction Given that digital logic and memory devices are based on two electrical states (on and off), it is natural to use a number

More information

Chapter 1. Digital Systems and Binary Numbers

Chapter 1. Digital Systems and Binary Numbers Chapter 1. Digital Systems and Binary Numbers Tong In Oh 1 1.1 Digital Systems Digital age Characteristic of digital system Generality and flexibility Represent and manipulate discrete elements of information

More information

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc. Chapter 3: Number Systems and Codes Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc., 5 th edition Decimal System The radix or base of a number system determines

More information

MGU-BCA-205- Second Sem- Core VI- Fundamentals of Digital Systems- MCQ s. 2. Why the decimal number system is also called as positional number system?

MGU-BCA-205- Second Sem- Core VI- Fundamentals of Digital Systems- MCQ s. 2. Why the decimal number system is also called as positional number system? MGU-BCA-205- Second Sem- Core VI- Fundamentals of Digital Systems- MCQ s Unit-1 Number Systems 1. What does a decimal number represents? A. Quality B. Quantity C. Position D. None of the above 2. Why the

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2006 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems

More information

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS C H A P T E R 6 DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS OUTLINE 6- Binary Addition 6-2 Representing Signed Numbers 6-3 Addition in the 2 s- Complement System 6-4 Subtraction in the 2 s- Complement

More information

Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction

Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES Structure 2.1 Introduction 2.2 Objectives 2.3 Binary Numbers 2.3.1 Binary-to-Decimal conversion 2.3.2 Decimal-to-Binary Conversion 2.4 Octal Numbers

More information

Lecture (02) Operations on numbering systems

Lecture (02) Operations on numbering systems Lecture (02) Operations on numbering systems By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2018, CSE202 Logic Design I Complements of a number Complements are used in digital computers to simplify

More information

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1 IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds. UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers of ): DIGIT 3 4 5 6 7 8 9 Number:

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds. ECE-78: Digital Logic Design Fall 6 UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers

More information

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng Slide Set 1 for ENEL 339 Fall 2014 Lecture Section 02 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 2014 ENEL 353 F14 Section

More information

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library 3.1 Combinational Circuits 2 Chap 3. logic circuits for digital systems: combinational vs sequential Combinational Logic Design Combinational Circuit (Chap 3) outputs are determined by the present applied

More information

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April SET - 1 II B. Tech II Semester, Supplementary Examinations, April - 2012 SWITCHING THEORY AND LOGIC DESIGN (Electronics and Communications Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions

More information

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur-603 203 DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS YEAR / SEMESTER: II / III ACADEMIC YEAR: 2015-2016 (ODD

More information

Lecture (03) Binary Codes Registers and Logic Gates

Lecture (03) Binary Codes Registers and Logic Gates Lecture (03) Binary Codes Registers and Logic Gates By: Dr. Ahmed ElShafee Binary Codes Digital systems use signals that have two distinct values and circuit elements that have two stable states. binary

More information

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information Logic and Computer Design Fundamentals Chapter 1 Digital Computers and Information Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal]

More information

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence GATE Postal Correspondence Computer Sc. & IT 1 Digital Logic Computer Sciencee & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,

More information

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) NUMBER SYSTEM A considerable subset of digital systems deals with arithmetic operations. To understand the

More information

Combinational Circuits

Combinational Circuits Combinational Circuits Combinational circuit consists of an interconnection of logic gates They react to their inputs and produce their outputs by transforming binary information n input binary variables

More information

Learning the Binary System

Learning the Binary System Learning the Binary System www.brainlubeonline.com/counting_on_binary/ Formated to L A TEX: /25/22 Abstract This is a document on the base-2 abstract numerical system, or Binary system. This is a VERY

More information

COMBINATIONAL LOGIC CIRCUITS

COMBINATIONAL LOGIC CIRCUITS COMBINATIONAL LOGIC CIRCUITS 4.1 INTRODUCTION The digital system consists of two types of circuits, namely: (i) Combinational circuits and (ii) Sequential circuits A combinational circuit consists of logic

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R059210504 Set No. 1 II B.Tech I Semester Supplementary Examinations, February 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science

More information

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR UNIT I Digital Systems: Binary Numbers, Octal, Hexa Decimal and other base numbers, Number base conversions, complements, signed binary numbers, Floating point number representation, binary codes, error

More information

Digital Logic Design Exercises. Assignment 1

Digital Logic Design Exercises. Assignment 1 Assignment 1 For Exercises 1-5, match the following numbers with their definition A Number Natural number C Integer number D Negative number E Rational number 1 A unit of an abstract mathematical system

More information

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3 UNIT - I PART A (2 Marks) 1. Using Demorgan s theorem convert the following Boolean expression to an equivalent expression that has only OR and complement operations. Show the function can be implemented

More information

SWITCHING THEORY AND LOGIC CIRCUITS

SWITCHING THEORY AND LOGIC CIRCUITS SWITCHING THEORY AND LOGIC CIRCUITS COURSE OBJECTIVES. To understand the concepts and techniques associated with the number systems and codes 2. To understand the simplification methods (Boolean algebra

More information

Lecture 2: Number Systems

Lecture 2: Number Systems Lecture 2: Number Systems Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University Contents

More information

Chapter 2. Boolean Algebra and Logic Gates

Chapter 2. Boolean Algebra and Logic Gates Chapter 2. Boolean Algebra and Logic Gates Tong In Oh 1 Basic Definitions 2 3 2.3 Axiomatic Definition of Boolean Algebra Boolean algebra: Algebraic structure defined by a set of elements, B, together

More information

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR DLD UNIT III Combinational Circuits (CC), Analysis procedure, Design Procedure, Combinational circuit for different code converters and other problems, Binary Adder- Subtractor, Decimal Adder, Binary Multiplier,

More information

IT 201 Digital System Design Module II Notes

IT 201 Digital System Design Module II Notes IT 201 Digital System Design Module II Notes BOOLEAN OPERATIONS AND EXPRESSIONS Variable, complement, and literal are terms used in Boolean algebra. A variable is a symbol used to represent a logical quantity.

More information

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:

More information

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:

More information

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES Structure 2.0 Introduction 2.1 Unit Objectives 2.2 Number Systems 2.3 Bits and Bytes 2.4 Binary Number System 2.5 Decimal Number System 2.6 Octal Number System

More information

Code No: R Set No. 1

Code No: R Set No. 1 Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems

More information

COPYRIGHTED MATERIAL INDEX

COPYRIGHTED MATERIAL INDEX INDEX Absorption law, 31, 38 Acyclic graph, 35 tree, 36 Addition operators, in VHDL (VHSIC hardware description language), 192 Algebraic division, 105 AND gate, 48 49 Antisymmetric, 34 Applicable input

More information

CHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER

CHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 1 CHAPTER TWO Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 2-1 Data Types 2-2 Complements 2-3 Fixed-Point Representation 2-4 Floating-Point Representation

More information

UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS

UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS (09 periods) Computer Arithmetic: Data Representation, Fixed Point Representation, Floating Point Representation, Addition and

More information

Combinational Logic Circuits

Combinational Logic Circuits Combinational Logic Circuits By Dr. M. Hebaishy Digital Logic Design Ch- Rem.!) Types of Logic Circuits Combinational Logic Memoryless Outputs determined by current values of inputs Sequential Logic Has

More information

Injntu.com Injntu.com Injntu.com R16

Injntu.com Injntu.com Injntu.com R16 1. a) What are the three methods of obtaining the 2 s complement of a given binary (3M) number? b) What do you mean by K-map? Name it advantages and disadvantages. (3M) c) Distinguish between a half-adder

More information

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Digital Systems COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Welcome to COE 202 Course Webpage: http://faculty.kfupm.edu.sa/coe/mudawar/coe202/ Lecture

More information

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-2 NUMBER SYSTEMS RADIX-R REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(

More information

Review of Number Systems

Review of Number Systems Review of Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a digital computer.

More information

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI 621 105 DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC1201 DIGITAL

More information

Logic, Words, and Integers

Logic, Words, and Integers Computer Science 52 Logic, Words, and Integers 1 Words and Data The basic unit of information in a computer is the bit; it is simply a quantity that takes one of two values, 0 or 1. A sequence of k bits

More information

(ii) Simplify and implement the following SOP function using NOR gates:

(ii) Simplify and implement the following SOP function using NOR gates: DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EE6301 DIGITAL LOGIC CIRCUITS UNIT I NUMBER SYSTEMS AND DIGITAL LOGIC FAMILIES PART A 1. How can an OR gate be

More information

DIGITAL ELECTRONICS. P41l 3 HOURS

DIGITAL ELECTRONICS. P41l 3 HOURS UNIVERSITY OF SWAZILAND FACUL TY OF SCIENCE AND ENGINEERING DEPARTMENT OF PHYSICS MAIN EXAMINATION 2015/16 TITLE OF PAPER: COURSE NUMBER: TIME ALLOWED: INSTRUCTIONS: DIGITAL ELECTRONICS P41l 3 HOURS ANSWER

More information

UNIT- V COMBINATIONAL LOGIC DESIGN

UNIT- V COMBINATIONAL LOGIC DESIGN UNIT- V COMBINATIONAL LOGIC DESIGN NOTE: This is UNIT-V in JNTUK and UNIT-III and HALF PART OF UNIT-IV in JNTUA SYLLABUS (JNTUK)UNIT-V: Combinational Logic Design: Adders & Subtractors, Ripple Adder, Look

More information

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 APPENDIX A.1 Number systems and codes Since ten-fingered humans are addicted to the decimal system, and since computers

More information

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of

More information

Lecture 1: Digital Systems and Number Systems

Lecture 1: Digital Systems and Number Systems Lecture 1: Digital Systems and Number Systems Matthew Shuman September 26th, 2012 The Digital Abstraction 1.3 in Text Analog Systems Analog systems are continuous. Look at the analog clock in figure 1.

More information

Lecture (05) Boolean Algebra and Logic Gates

Lecture (05) Boolean Algebra and Logic Gates Lecture (05) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee ١ Minterms and Maxterms consider two binary variables x and y combined with an AND operation. Since eachv ariable may appear in either

More information

Code No: 07A3EC03 Set No. 1

Code No: 07A3EC03 Set No. 1 Code No: 07A3EC03 Set No. 1 II B.Tech I Semester Regular Examinations, November 2008 SWITCHING THEORY AND LOGIC DESIGN ( Common to Electrical & Electronic Engineering, Electronics & Instrumentation Engineering,

More information

Positional Number System

Positional Number System Positional Number System A number is represented by a string of digits where each digit position has an associated weight. The weight is based on the radix of the number system. Some common radices: Decimal.

More information

Digital Techniques. Lecture 1. 1 st Class

Digital Techniques. Lecture 1. 1 st Class Digital Techniques Lecture 1 1 st Class Digital Techniques Digital Computer and Digital System: Digital computer is a part of digital system, it based on binary system. A block diagram of digital computer

More information

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 CS 64 Lecture 2 Data Representation Reading: FLD 1.2-1.4 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 ) + (1x10 0 ) 1010 10?= 1010 2?= 1

More information

Systems Programming. Lecture 2 Review of Computer Architecture I

Systems Programming.   Lecture 2 Review of Computer Architecture I Systems Programming www.atomicrhubarb.com/systems Lecture 2 Review of Computer Architecture I In The Book Patt & Patel Chapter 1,2,3 (review) Outline Binary Bit Numbering Logical operations 2's complement

More information

Number representations

Number representations Number representations Number bases Three number bases are of interest: Binary, Octal and Hexadecimal. We look briefly at conversions among them and between each of them and decimal. Binary Base-two, or

More information

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal Positional notation Ch.. /continued Conversions between Decimal and Binary Binary to Decimal - use the definition of a number in a positional number system with base - evaluate the definition formula using

More information

Final Labs and Tutors

Final Labs and Tutors ICT106 Fundamentals of Computer Systems - Topic 2 REPRESENTATION AND STORAGE OF INFORMATION Reading: Linux Assembly Programming Language, Ch 2.4-2.9 and 3.6-3.8 Final Labs and Tutors Venue and time South

More information

Introduction to Computers and Programming. Numeric Values

Introduction to Computers and Programming. Numeric Values Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 5 Reading: B pp. 47-71 Sept 1 003 Numeric Values Storing the value of 5 10 using ASCII: 00110010 00110101 Binary notation: 00000000

More information

Korea University of Technology and Education

Korea University of Technology and Education MEC52 디지털공학 Binary Systems Jee-Hwan Ryu School of Mechanical Engineering Binary Numbers a 5 a 4 a 3 a 2 a a.a - a -2 a -3 base or radix = a n r n a n- r n-...a 2 r 2 a ra a - r - a -2 r -2...a -m r -m

More information

Topic Notes: Bits and Bytes and Numbers

Topic Notes: Bits and Bytes and Numbers Computer Science 220 Assembly Language & Comp Architecture Siena College Fall 2010 Topic Notes: Bits and Bytes and Numbers Binary Basics At least some of this will be review, but we will go over it for

More information

Objectives. Connecting with Computer Science 2

Objectives. Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn how numbering systems are used to count Understand the significance of positional value

More information

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects: Numeral Systems -Numeral System -Positional systems -Decimal -Binary -Octal Subjects: Introduction A numeral system (or system of numeration) is a writing system for expressing numbers, that is a mathematical

More information

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT COE 202: Digital Logic Design Term 162 (Spring 2017) Instructor: Dr. Abdulaziz Barnawi Class time: U.T.R.: 11:00-11:50AM Class

More information