Intro to Logic Circuit Design (University of Utah) - Arithmetic Circuits (Discussion 5)
Overview
Arithmetic-circuit design examples show how to count the 1s in a 6-bit input by adding its bits, then build a ternary adder using binary encodings, a truth table, and Karnaugh maps. The final section converts negative values including 95 and 1630 into 12-bit one's-complement and two's-complement forms, explaining carry handling and signed-width requirements.
Key takeaways
- A 6-bit population counter can be built by adding the six input bits, and its count output needs 3 bits because the result ranges from 0 through 6.
- A ternary digit needs 2 binary bits, but the encoding 11 is unused; those invalid input combinations can simplify the ternary adder's Karnaugh-map equations as don't-cares.
- A ternary adder produces three logic outputs in this encoding: carry, S1, and S0; minimize them separately unless the task calls for joint multi-output optimization.
- To encode a negative number in one's complement, invert its fixed-width positive binary form; to encode it in two's complement, invert and add 1.
- For fixed-width arithmetic, two's complement discards overflow beyond the word, while one's complement uses end-around carry by adding that overflow back to the low bit.
Chapters
- The circuit's output is the number of 1s among six input bits, so the task reduces to adding six single-bit values.
- A population count can range from 0 to 6, requiring 3 output bits.
- Adder outputs include both a sum and a carry, so the design must preserve carries while combining partial sums.
- Represent each ternary input digit, 0, 1, or 2, using two binary bits; encode the carry and sum as binary outputs.
- Convert the ternary addition cases into a binary truth table, then use Karnaugh maps to derive logic for the carry and two sum bits.
- Two 2-bit inputs create 4 input bits and 16 possible binary input rows; rows containing the invalid ternary encoding 11 can be treated as don't-cares.
- By default, minimize the carry, S1, and S0 outputs independently; joint multi-output optimization is appropriate when explicitly requested.
- Start with the positive magnitude in 12-bit binary, then invert every bit to form its negative one's-complement representation.
- For two's complement, add 1 to the one's-complement pattern; for example, +95 is 000001011111, so -95 is 111110100000 in one's complement and 111110100001 in two's complement.
- The larger example uses 1630: +1630 is 011001011110 in 12 bits, giving -1630 as 100110100001 in one's complement and 100110100010 in two's complement.
- In 12-bit two's-complement addition, discard any carry beyond the most significant bit.
- In one's-complement addition, fold a carry out of the 12-bit result back into the least significant bit.
- The magnitude 1630 needs 11 binary bits, and the discussion uses a 12-bit signed representation to accommodate its sign.
Transcript excerpt
0:26 number arithmetic circuit solve some examples regarding arithmetic circuit this is our first question we are asked to design circuit that determine how many of the bits in a six bit onside number are equal to one so basically we need to count the number of ones in bit number you can use predesign others as the design per count number in
1:14 number and بیاشون بریم upload after this. All right, let's solve this together. Okay, so let's little bit think about what the question is asking us and the things that we have. Okay. What is the relation of others? And so here we have two types of others. Correct.
2:06 and others and number of bas number how val [گلویش را صاف میکند] So we need to do the here if havebit
3:08 number bit need all the bits together zer don't have any value number of make sense so impement simpation number cap z add all together add3+4+5 Z21+0
4:01 اوکی ز3 need are this is this is carry out that means the summation exactly the summation this is result this is carry out this means this is exactlyation z+3 and this is z2 so result the carry out and result question
4:54 [خنده] so the main idea of basically that was the circuit implementation So the problem in terms of relating the summation of bits to number of was that the problem? No, I figured that out. My was in the car. Yes. Yeah. How do you So yeah, so basically I mean these things happens when you solve more examples, you get this ideas that is kind of the main thing but another direction is that
5:47 you know completely realizing what a does. Okay. Basically we have a C in here. Correct. So it's up to us we usually don't use it that much again in
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, MEDAL-Research.