It really does feel like that, he makes it seem so simple and easy to understand and is always reassuring that things can kind of depend on how you want to do them and why you want to do them that way :D
The last few videos have been SO helpful and such a good combination of theory on paper and applying in practice. Know this video is old but thank you so much for doing these!
As so many others have rightly commented, this is a great, great series - just what I was looking for in trying to develop an understanding down at the level of logic gates and transistors in the design and construction of a computer. I've already learned an enormous amount, both on theoretical and very material / practical levels, and am very grateful indeed. In this video, however, I tripped up at one place - resulting in what turned out to be two errors in wiring that resulted in arithmetic errors in some, but not all of the numbers I tried out when testing the A(L)U for the first time. On the one hand, as we saw in the next video on troubleshooting the ALU, this is a good thing - as we thereby are forced to go back through to troubleshoot, and thereby become all the more familiar with the details of the circuitry, etc. And as some have commented, it is one of the most satisfying experiences to finally do so successfully. Again, I've learned a great deal and am very grateful for my new understandings and modest skills, and the feeling they give of having better foundations and abilities for proceeding onto the next steps. That said: I ended up spending far more hours on the troubleshooting than I would have liked (however great the rewards) and would like to make a modest comment for folk like me who are entirely new to this and might get thrown off in the same way I did. At 8.23 or so, bits 8-5 from the 74LS245 buffer are fairly clearly connected into the proper inputs of the left XOR chip (74LS86). But then the video skips ahead here: we see bits 4 and 3 - apparently, as it is somewhat difficult to follow in this segment as it is speeded up and the lighting makes it difficult to see where the - already wired into pins 12 (4A input) and 9 (3A) on the right XOR chip; the last two bits are then shown as they are wired into pins 1 (1A) and 4 (2A). Both because it was difficult to see here - and, no doubt, because I have dyslexia and can easily get tripped up with such visuals - this is where I ended up making my mistake: miswiring bit 4 (should go to pin 9 on the LS245) and then bit 2 (should go to pin 1). Once the errors were corrected - i.e., the A(L)U functioned perfectly. Perhaps they teach one these things in engineering school - but for newbies like me, what turned out to be essential was (1) going back through the circuitry and chip diagrams in order to build simple tables of what pin needed to be connected to what - i.e., rather than relying solely on the video to show the right way. (2) I then initially tried to check the connections by tracing the physical wires - but because the wiring is so interwoven (and, again, my dyslexia doesn't help) I had to give this up. A good thing as I realized I could just check the connections using a continuity tester. Sorry for such a long post - but again, for newbies like me, these bits (pun intended) might help avoid errors that can take a great deal of time to sort out.
your teaching is basically God level practical with bit of theory I can complete your whole playlist within 3 days without fatigue and thats an open challenge
I am going to recommend your videos for the more motivated kids taking my digital logic class. The closest thing to these videos is the "Nand to Tetris" series, and that is almost and apple compared to this orange.
Hi, I have a question, i built a sort of 8 bits CPU in a software named Logisim, But I wonder if we can make all logical operations with This CPU witch just has an adder, a substracter and a comparator in its ALU. How to know it ? My second question is how to Add for exemple 220 and 140 ? Cause it makes 360 and a 8 bits CPU can't display numbers higher than 255. I ask that question cause i wonder why an Arduino which is in 8 bits can Add High numbers. By the same way, how to had 2 number higher than 255 ? Thanks a lot for any answer, and sorry for my english.
@Sydney Bean Hi ! indeed, i used a carry bit, but from it, i dont know how to make binary programs to add high numbers, i know doing nice things with it, but not that special thing (the code part seems too hard for me if my "homemade CPU" is able to do what i want it to do. I am thinking about begining assembly codes for a Z80. Maybe it will give me ideas...thx for your informations ;)
@@usern4m32 If you have an adder, then you should also have a carry bit flag, and then it is quite easy to add numbers greater than 255. However, if you also want to express negative numbers, you need to define first the word length. So, you can choose a bye for example, then you will be able to add two numbers up to a maximum of 127, because that is the highed positive number in one byte. Then you can have double bytes, and here you have byte 0 Byte 1 0 1 2 3 4 5 6 7 | 8 9 10 11 12 13 14 1+2+4+8+16+32+64+128+256+512+1025+2048+4096+8192+16384 (2 bytes is 16 bits, -1 1 for the negation flag is 15 bits) as a maximum in plus And the way you do it is basically like any other addition in decimal. When you
@@usern4m32 a subtractor and comparator can be made with an adder btw. to subtract (with a 4 bit adder for simplicity) keep one input the same (9 is still 1001) but invert the second and add 1 (2 starts out as 0010 but becomes 1110) and do the addition. u would end up with 7 (9 - 2). To compare with an adder, subtract the 2 numbers and use logic gates to check the output (0 means a == b, positive number (msb is 0) means a > b, and negative number (msb is 1) means b > a)
I am loving your series! Thank you so much! But i have a question that I do not see answered in the comments. In a previous video, you showed us that you added the tri-state octal buffer to the registers so that you can visualize the state of the registers with LED's. Without the buffer, the outputs would only be visible when enable is set (And the data is on the buffer). So it was clear that the buffers were added to aid in this educational/hobby scenario. But if my understanding is correct, you would also need them if you wanted to do what you have done here. i.e. if you did not have the buffers in place on the registers, then the ALU would only see the register values when enable was set on the registers. And of course, you should not have enable set on both buffers as they would clobber each others data lines on the buffer. So if my understanding is correct, then you NEED those octal tri-state buffers on the registers, not only for observation/education purposes, but as a requirement for feeding the registers output into the ALU without affecting the buffer. Is my understanding correct here? And if my understanding here is correct, then what is the point of the enable signal on the register chips? Is this maybe not a typical use of those chips? (This would completely make sense as I guess there is not a huge demand for people building CPU's from discrete components :) ) I really want to build me one of these. I wonder if I ever will :)
I have not thought it all the way but I think we could use the register's enable signal in conjunction with the octal tri-state buffer in order to have more than two registers capable of interacting with the ALU. We could connect, lets say registers A, B, C and D, to the ALU and enable only the registers A and B or C and D to have their sum. We could sum A and B and output the result to the BUS to later load into C without lose A and B values.
@@mmannes You could even select registers individually if you wanted, rather than in banks. So you could select A and B or A and D, if you wanted. It would need an additional control line and I don't know if it's a useful function. But again, this requires the tri-state buffer to be in the circuit, which re-inforces my thought that the buffer is a requirement and not merely an educational/informational extra.
@@Tomsta17 I agree. Since the ALU's operating is not triggered by the clock signal, it is a requirement that the ALU doesn't input data from the BUS but directly from the registers, which means that both registers must be able to send data without outputting it into the bus.
The only issue with breadboards (which i LOVE BTW), is if you mistakenly snag a wire and pull it out. then it's a game of figure out what you just broke, which can take hours. Which is why i did what you are doing, which is to make the wires as neat and low to the boards as possible, to prevent snagging in the first place, and also make it easier to spot where the wire went. I knew guys who would rats nest every time, and god help them if they pulled a wire by accident. I knew one guy who would just rip out everything and start over, because he felt it was faster. A neat breadboard is a happy breadboard! ^-^
You could like my calculator method for arithmetic. I use three sets loadable counters. The answer is always in counter 1. Counter 2 always counts down to zero. Counter 1 counting up(from a number) while counter 2 counts down(from a number) (to zero) results in addition. Counter 1 counting down while counter 2 counts down results in subtraction. Counter 1 being transferred to counter 2 then cleared to zero then addition taking place the number of times that is in counter 3 results in multiplication. Counter 1 being transferred to counter three then cleared to zero , then counter 1 counting the number of times counter 2 counts down (to zero) while counter 3 counts down until counter 3 equals zero results in division. I use sequencers made of latches , AND gates , and inverters to control how the counters count (for a calculator). By using instructions in memory to cause the counters to select the proper sequencer, arithmetic can be the result of instructions from memory being decoded to select the needed sequencer. Other sequencers can likely be created to accomplish logic functions and program control as well as input and output.
Merci pour les explications très claires et le partage de vos connaissances. (Many thanks for your cristal clear explanations and for the sharing of your knowledge.)
If you're following along and run out of space on your breadboard for the LEDs (due to lack of pull-up resistors in the CPU kit chips), you can connect the output of the LS245 (tri-state buffer) to the bus to test rather than having to rewire. I haven't finished building the whole kit yet, but my guess is this should suffice for the rest of the circuit.
I wonder... instead of having a single control signal (SUB) that drives both the XOR gates and the carry in to the lower adder, if we were to drive them separately then we could do some intresting extra things: ADD: Sub = 0, CI = 0 (As we currently have things) SUB: Sub = 1, CI = 1 (As we currently have things) ADC: Sub = 0, CI = Carry flag (Add with carry) SUC: Sub = 1, CI = NOT carry flag (Subtract with carry) Where Sub is the input to the XOR gates and CI is a carry in signal. This would allow the computer to do addition and subtraction of data that is larger than 8 bits. We would ADD/SUB the lowest bytes together and ADC/SUC all the remaining bytes. I don't think we would need to do any additional wiring as the carry flag is an input to the control unit, which would be driving the CI and Sub control lines. If we did this I also suspect you could play with the micro code to create a bitwise NOT of the A-register: * copy A to B * subtract B from A. * Store the result in A. This will leave 0 in A and the original content of A in B * Sub = 1 and CI = 0. This will invert B and add 0 to the result * Store the result in A. A should now be ones complement of its original value Our ALU finally has a logic operation!
At 7:00 Ben puts the buffer into the wrong pin. He puts in input pin 12 which is the A part of the adder and not the third sum. You can fix this by just putting the pin up one higher into pin 13 which is Sigma 3.
Really love the video's Ben, they are very clear and informative. Thank you for sharing your extensive knowledge!! Ignore my previous comment which I deleted I got the pin out wrong Co means carry in I thought it was the Carry out :(
Your a geniuous. Not because you understand ths things, but because you of your capability to explain it in a perfect manner. When I say perfect, I mean perfect. (>99.9997847839899). I assume I would not like your 100000th movie to get this result.
I suggest using different color wires for different connections like using green for A register to ALU and yellow for B register to XOR gates and so on instead of using the same greenish blue wires for everything. Edit: also I think it’s good practice to connect the carry out of the second 4-bit adder to ground through a resistor instead of just leaving it floating.
Spoilers below: When he turned the ones complement into two's complement by hooking up the high input to the xor gates into the carry in on the adder, I pogchamped.
"And actually, you know what i'm going to do? These are fine the way they are, but you, I'm going to try and neaten these up a little bit just by bending the leads and cutting things and, you know, trimming things [sic] obviously totally optional..." I heard this and had a sudden flashback of a particular chef who just couldn't help but neaten up the cooking scraps with a bit of aluminum foil and a sandwhich bag... you know, just to prevent the scraps from leaking on the rest of the garbage.
One of my 74LS283 chips turned out to be defective. Pinout was correct but was just giving me the wrong results. Swapped it out with the other one with exactly the same pinout and was getting the right results. Putting the other chip back in resulted in the magic smoke coming out. Bought some more but i'm stuck with a 4bit ALU for the next week and a half.
When looking for parts, what is the difference between SN74LS245N and SN74LS245NE4 ? Looking at the Mouser site the table seems to list them as being identical so whats their difference?
András Kiss In future try digikey.. I found ebay is much more expensive overall. I got a few parts from there (like breadboards and wire strippers) but all my electronic components I got from digikey. I live in Canada though, this may not be true where you are frpm!
Ben you've probably been told this before, but you nice neat circuits and you name go hand-in-hand: Ben Eater = Be Neater. Wait, is your name really Ben Eater?
I would have thought that the ALU, would have internal registers for the operands so they could be from memory or registers, but not really necessary in this simple implementation?
Where are you getting these parts? I've tried searching them in a couple different places but I can't find any I can buy. Is there a website anyone uses that has all the parts in this video series?
alexander kramer I get mine from eBay you could try mouser electronics I heard they have good stuff, if you order from China on eBay you can get free shipping
Totally optional Ben says… I just know had Ben been in the same class as I learning Catgut cable tidying we’d have all left the class knowing the bar would be set beyond our skills 😂
How can I design an 8-bit adder block that can add any two 8-bit registers from a bank of 5 registers and then store the result again in any one of them.
You can get DIP-sized LED bars as well as small form-factor LEDs with 2.54mm lead spacing, but they're not always as versatile if you need to go directly from the main board area to ground, because breadboards differ sometimes in the spacing of the ground and power busses. It also of course just depends on what you have available to work with at the time.
i faced a problem with alu part. i bought a 74hc283 ic from shop and i connect the pin 8 to ground and the pin 16 to the vcc the voltage of pin 7,9,10,11,12,13,14,15 is high and the voltage of the pin 1,2,3,4,5,6 is 0 why it is happening? as far as i know 74hc283 is a binary adder. it also showing wrong output. the ic become hot when i connect the input pins. Basically the out put pin 9,10,13 always high whatever the input is. pin 1,2,3,4,5,6 always low. I am stuck into this from two days. Anyone please help me.
sorry to ask but, up until this point, you have 6 bread boards but this module plus the clock is only 5. am i missing one? do i need to go out and buy another one?
Noob recommendation, watch the entire video before wiring. remember to have space for resistors. change the order of the wiring to suit you. so its easier to get in and out while seeing what is happening while disturbing the other wires as little as possible
Something that occurs to me, why use subtraction? Seems like a dumb question but I have been have fun with a different kind of math and in that math, there is no subtraction, nor even negative numbers. Seems like it would be better that way
I have a question: istnt this ALU able to do just A - B? What if I want to do B - A? Should we not have then the XOR gates also next to the A register and have SUB_A and SUB_B signals?
I taught about this too. If you wanted to calculate the difference between 7 and 5 you ALU would output 2 as expected. But in you case the calculation would be 5-7 which is -2, thats just your result invertet. In binary a two is 0010 and a negative 2 would be in 1s comeliment 1101. So I was thinking that maybe in that case you could just build an inverter for all bits. Of course you have to converte that in 2s complement at the end.
I did a few rough calculations and a sim for the adder portion of the ALU. A kogge-stone adder for 16bits built with 74HC 86/32/08 chips came out 192 nS (max 4.5v) and 94 nS (typ 5V 15pF load). A 74HC283 16 bit ripple carry cct came out 184 nS and 92 nS typ. So 192/94 nS vs 184/92 nS. This seems to be the breakpoint. At 32 bits the numbers are 228/112 vs 368/184 nS i.e. 60% speed improvement. However a KS adder with 32 bits is a lot of 74HC chips so capacitance will drop the speed improvements. All bets are off if it's implemented into a gate array - use the KS. For up to 16bits I would just use ripple carry and 74HC283's.
Check the data sheets. Depending on the chip those resistors are 'built in'. I believe he covered it in previous video. I may be mistaken however. Check the chip data sheets.
@@drzorbo3770 Well, the inputs do have internal pull-up resistors, but that's pretty much it, the output is just either shorted to ground, or shorted to Vcc.
Markus Rohner you could achieve multiplication by repeated addition. It would be costly but to do 5x7 you can just add 7 into an empty register 5 times.You can use another register to store a count and compare to see if you've added enough times.
Definitely the Bob Ross of electronics :D
love these series!
no, Bob Ross has technique but zero talent.
there are no bugs, just happy little interferences
It really does feel like that, he makes it seem so simple and easy to understand and is always reassuring that things can kind of depend on how you want to do them and why you want to do them that way :D
But not the Bob Pease
OMG that is the perfect description haha
look at the bright side, its much better than a puff of smoke comming up right when you power it up.
100 like
145 like
65536 like and poof!
just realized 'ben eater' is 'be neater'
sorry if that's a known fact
That explain why his circuits are so neat
bene á terre
The last few videos have been SO helpful and such a good combination of theory on paper and applying in practice. Know this video is old but thank you so much for doing these!
As so many others have rightly commented, this is a great, great series - just what I was looking for in trying to develop an understanding down at the level of logic gates and transistors in the design and construction of a computer. I've already learned an enormous amount, both on theoretical and very material / practical levels, and am very grateful indeed.
In this video, however, I tripped up at one place - resulting in what turned out to be two errors in wiring that resulted in arithmetic errors in some, but not all of the numbers I tried out when testing the A(L)U for the first time. On the one hand, as we saw in the next video on troubleshooting the ALU, this is a good thing - as we thereby are forced to go back through to troubleshoot, and thereby become all the more familiar with the details of the circuitry, etc. And as some have commented, it is one of the most satisfying experiences to finally do so successfully. Again, I've learned a great deal and am very grateful for my new understandings and modest skills, and the feeling they give of having better foundations and abilities for proceeding onto the next steps.
That said: I ended up spending far more hours on the troubleshooting than I would have liked (however great the rewards) and would like to make a modest comment for folk like me who are entirely new to this and might get thrown off in the same way I did.
At 8.23 or so, bits 8-5 from the 74LS245 buffer are fairly clearly connected into the proper inputs of the left XOR chip (74LS86). But then the video skips ahead here: we see bits 4 and 3 - apparently, as it is somewhat difficult to follow in this segment as it is speeded up and the lighting makes it difficult to see where the - already wired into pins 12 (4A input) and 9 (3A) on the right XOR chip; the last two bits are then shown as they are wired into pins 1 (1A) and 4 (2A).
Both because it was difficult to see here - and, no doubt, because I have dyslexia and can easily get tripped up with such visuals - this is where I ended up making my mistake: miswiring bit 4 (should go to pin 9 on the LS245) and then bit 2 (should go to pin 1). Once the errors were corrected - i.e., the A(L)U functioned perfectly.
Perhaps they teach one these things in engineering school - but for newbies like me, what turned out to be essential was (1) going back through the circuitry and chip diagrams in order to build simple tables of what pin needed to be connected to what - i.e., rather than relying solely on the video to show the right way. (2) I then initially tried to check the connections by tracing the physical wires - but because the wiring is so interwoven (and, again, my dyslexia doesn't help) I had to give this up. A good thing as I realized I could just check the connections using a continuity tester.
Sorry for such a long post - but again, for newbies like me, these bits (pun intended) might help avoid errors that can take a great deal of time to sort out.
thanks for the heads up! This one was a bit trickier with the wiring for sure.
your teaching is basically God level practical with bit of theory I can complete your whole playlist within 3 days without fatigue and thats an open challenge
Just love it how the wires bent themselves to your will when you pick them up... :-) Great work!
That's some impressive breadboarding!
It's 2020 and these videos are still awesome
Wrong. It’s 2021 and the se videos are still awesome! ;)
@@kvadratbitter Wrong again! It's 2022 (just a couple of days from 2023, actually) and the videos are still absolutely amazing!
Wrong it's still so amazing in Nov 2023
@@SunLake-pr1di2024 now
@@SunLake-pr1diWrong! It’s 2024 and these videos are still awesome.
I am going to recommend your videos for the more motivated kids taking my digital logic class. The closest thing to these videos is the "Nand to Tetris" series, and that is almost and apple compared to this orange.
For the clock signal being in the way, I would have just added another bus line just for the clock. Smaller connection, less wiring.
Hi, I have a question, i built a sort of 8 bits CPU in a software named Logisim, But I wonder if we can make all logical operations with This CPU witch just has an adder, a substracter and a comparator in its ALU. How to know it ? My second question is how to Add for exemple 220 and 140 ? Cause it makes 360 and a 8 bits CPU can't display numbers higher than 255. I ask that question cause i wonder why an Arduino which is in 8 bits can Add High numbers. By the same way, how to had 2 number higher than 255 ? Thanks a lot for any answer, and sorry for my english.
@Sydney Bean Hi ! indeed, i used a carry bit, but from it, i dont know how to make binary programs to add high numbers, i know doing nice things with it, but not that special thing (the code part seems too hard for me if my "homemade CPU" is able to do what i want it to do. I am thinking about begining assembly codes for a Z80. Maybe it will give me ideas...thx for your informations ;)
But then you can't put the bus on a Cat 5 cable.
@@usern4m32 If you have an adder, then you should also have a carry bit flag, and then it is quite easy to add numbers greater than 255. However, if you also want to express negative numbers, you need to define first the word length. So, you can choose a bye for example, then you will be able to add two numbers up to a maximum of 127, because that is the highed positive number in one byte. Then you can have double bytes, and here you have
byte 0 Byte 1
0 1 2 3 4 5 6 7 | 8 9 10 11 12 13 14
1+2+4+8+16+32+64+128+256+512+1025+2048+4096+8192+16384
(2 bytes is 16 bits, -1 1 for the negation flag is 15 bits)
as a maximum in plus
And the way you do it is basically like any other addition in decimal. When you
@@usern4m32 a subtractor and comparator can be made with an adder btw. to subtract (with a 4 bit adder for simplicity) keep one input the same (9 is still 1001) but invert the second and add 1 (2 starts out as 0010 but becomes 1110) and do the addition. u would end up with 7 (9 - 2). To compare with an adder, subtract the 2 numbers and use logic gates to check the output (0 means a == b, positive number (msb is 0) means a > b, and negative number (msb is 1) means b > a)
I am loving your series! Thank you so much!
But i have a question that I do not see answered in the comments.
In a previous video, you showed us that you added the tri-state octal buffer to the registers so that you can visualize the state of the registers with LED's. Without the buffer, the outputs would only be visible when enable is set (And the data is on the buffer). So it was clear that the buffers were added to aid in this educational/hobby scenario.
But if my understanding is correct, you would also need them if you wanted to do what you have done here. i.e. if you did not have the buffers in place on the registers, then the ALU would only see the register values when enable was set on the registers. And of course, you should not have enable set on both buffers as they would clobber each others data lines on the buffer.
So if my understanding is correct, then you NEED those octal tri-state buffers on the registers, not only for observation/education purposes, but as a requirement for feeding the registers output into the ALU without affecting the buffer. Is my understanding correct here?
And if my understanding here is correct, then what is the point of the enable signal on the register chips? Is this maybe not a typical use of those chips? (This would completely make sense as I guess there is not a huge demand for people building CPU's from discrete components :) )
I really want to build me one of these. I wonder if I ever will :)
I have not thought it all the way but I think we could use the register's enable signal in conjunction with the octal tri-state buffer in order to have more than two registers capable of interacting with the ALU.
We could connect, lets say registers A, B, C and D, to the ALU and enable only the registers A and B or C and D to have their sum. We could sum A and B and output the result to the BUS to later load into C without lose A and B values.
@@mmannes You could even select registers individually if you wanted, rather than in banks. So you could select A and B or A and D, if you wanted. It would need an additional control line and I don't know if it's a useful function.
But again, this requires the tri-state buffer to be in the circuit, which re-inforces my thought that the buffer is a requirement and not merely an educational/informational extra.
@@Tomsta17 I agree. Since the ALU's operating is not triggered by the clock signal, it is a requirement that the ALU doesn't input data from the BUS but directly from the registers, which means that both registers must be able to send data without outputting it into the bus.
If I had your patience I would definetly try to do this, you are a genius
The only issue with breadboards (which i LOVE BTW), is if you mistakenly snag a wire and pull it out. then it's a game of figure out what you just broke, which can take hours. Which is why i did what you are doing, which is to make the wires as neat and low to the boards as possible, to prevent snagging in the first place, and also make it easier to spot where the wire went. I knew guys who would rats nest every time, and god help them if they pulled a wire by accident. I knew one guy who would just rip out everything and start over, because he felt it was faster.
A neat breadboard is a happy breadboard! ^-^
You make these things look so simple that’s awesome
Again, Brilliant. I'm very pleased you made a mistake with your wiring. Makes for an exciting follow-up video! Thank you.
You must love these videos, your logo is literally a logic chip!
I love how your breadboarding wires are always magically the right length and shape. 😄
Here is a wire that I prepared earlier.
You could like my calculator method for arithmetic. I use three sets loadable counters. The answer is always in counter 1. Counter 2 always counts down to zero. Counter 1 counting up(from a number) while counter 2 counts down(from a number) (to zero) results in addition. Counter 1 counting down while counter 2 counts down results in subtraction. Counter 1 being transferred to counter 2 then cleared to zero then addition taking place the number of times that is in counter 3 results in multiplication. Counter 1 being transferred to counter three then cleared to zero , then counter 1 counting the number of times counter 2 counts down (to zero) while counter 3 counts down until counter 3 equals zero results in division. I use sequencers made of latches , AND gates , and inverters to control how the counters count (for a calculator). By using instructions in memory to cause the counters to select the proper sequencer, arithmetic can be the result of instructions from memory being decoded to select the needed sequencer. Other sequencers can likely be created to accomplish logic functions and program control as well as input and output.
Nice continuation and conclusion, which is how all my circuits go 1st (or 5th) time around. Look forward to troubleshooting vid.
4:13 'While we're at it I'll also neaten up this power connection between these boards...' Moral: Be Neater
Love your vids Ben, ALL of them. Thank you. You do a great job. keep it up!
This adder/subtractor circuit is genius!
Cool! Looking forward to the debugging. Thanks again for making these!
Merci pour les explications très claires et le partage de vos connaissances.
(Many thanks for your cristal clear explanations and for the sharing of your knowledge.)
That is a work of art ! I hope it is permanent. Im surprised you didnt use the 1/8” or bar graph LEDs
If you're following along and run out of space on your breadboard for the LEDs (due to lack of pull-up resistors in the CPU kit chips), you can connect the output of the LS245 (tri-state buffer) to the bus to test rather than having to rewire. I haven't finished building the whole kit yet, but my guess is this should suffice for the rest of the circuit.
Very simple and clear explanation of not simple things. Thank you very much! Great channel!
Thank you for continuing this amazing tutorial, keep up the great work!
I'm addicted to your videos.
I wonder... instead of having a single control signal (SUB) that drives both the XOR gates and the carry in to the lower adder, if we were to drive them separately then we could do some intresting extra things:
ADD: Sub = 0, CI = 0 (As we currently have things)
SUB: Sub = 1, CI = 1 (As we currently have things)
ADC: Sub = 0, CI = Carry flag (Add with carry)
SUC: Sub = 1, CI = NOT carry flag (Subtract with carry)
Where Sub is the input to the XOR gates and CI is a carry in signal.
This would allow the computer to do addition and subtraction of data that is larger than 8 bits. We would ADD/SUB the lowest bytes together and ADC/SUC all the remaining bytes.
I don't think we would need to do any additional wiring as the carry flag is an input to the control unit, which would be driving the CI and Sub control lines.
If we did this I also suspect you could play with the micro code to create a bitwise NOT of the A-register:
* copy A to B
* subtract B from A.
* Store the result in A. This will leave 0 in A and the original content of A in B
* Sub = 1 and CI = 0. This will invert B and add 0 to the result
* Store the result in A. A should now be ones complement of its original value
Our ALU finally has a logic operation!
At 7:00 Ben puts the buffer into the wrong pin. He puts in input pin 12 which is the A part of the adder and not the third sum. You can fix this by just putting the pin up one higher into pin 13 which is Sigma 3.
I was debugging this issue for 3 hours. Thank you
Saw him do that and immediately looked to the comments like... "that can't be right"...
I don't know how fast you guys are at cutting/shaping/wiring...but this video alone took me like 3.5 hours lol
if you want it to look as nice as possible, then 3.5h is totally normal i guess :D same here :D
Impressive job! I would have fallen of my chair if it worked right away in one time :)
Somehow it felt kind of reassuring it didn't and made me keep watching. This stuff is so good!
Really love the video's Ben, they are very clear and informative. Thank you for sharing your extensive knowledge!! Ignore my previous comment which I deleted I got the pin out wrong Co means carry in I thought it was the Carry out :(
Your a geniuous. Not because you understand ths things, but because you of your capability to explain it in a perfect manner. When I say perfect, I mean perfect. (>99.9997847839899). I assume I would not like your 100000th movie to get this result.
That's a really fantastic explanation. Thank you!
Now that's a proper stanley knife :)
I suggest using different color wires for different connections like using green for A register to ALU and yellow for B register to XOR gates and so on instead of using the same greenish blue wires for everything.
Edit: also I think it’s good practice to connect the carry out of the second 4-bit adder to ground through a resistor instead of just leaving it floating.
Love these videos. So interesting and clear.
Its ironically looking futuristic
Permanent has a useful meaning on a breadboard. It means "won't be changing until this project's done."
Love this series. Would have liked to have seen different colors for input/output.
Spoilers below:
When he turned the ones complement into two's complement by hooking up the high input to the xor gates into the carry in on the adder, I pogchamped.
"And actually, you know what i'm going to do? These are fine the way they are, but you, I'm going to try and neaten these up a little bit just by bending the leads and cutting things and, you know, trimming things [sic] obviously totally optional..."
I heard this and had a sudden flashback of a particular chef who just couldn't help but neaten up the cooking scraps with a bit of aluminum foil and a sandwhich bag... you know, just to prevent the scraps from leaking on the rest of the garbage.
One of my 74LS283 chips turned out to be defective. Pinout was correct but was just giving me the wrong results. Swapped it out with the other one with exactly the same pinout and was getting the right results. Putting the other chip back in resulted in the magic smoke coming out. Bought some more but i'm stuck with a 4bit ALU for the next week and a half.
well thats not good :D but it happens =)
When looking for parts, what is the difference between SN74LS245N and SN74LS245NE4 ? Looking at the Mouser site the table seems to list them as being identical so whats their difference?
Electronic spaghetti ^^ ;)
what a wonderful serie of video, very interesting, thank you :)
This reminds me of my first month when I was in computer science.
I cannot believe this worked the first try for me. I had such a nightmare wiring this, was not looking forward to the debug!
Wow these parts are expensive. I've been purchasing them on ebay as I watch your videos, and the sum (pun intended) going pretty high.
András Kiss Buying one of most electrical components is usually more expensive than buying 10 from Mouser or Tayda.
András Kiss Have you tried digikey? There have very good prices, and free shipping after $100
Fwacer yes I have checked them out. However, I ordered from ebay. I needed only a few pieces and it was cheaper from there. Thanks for the suggestion.
András Kiss In future try digikey.. I found ebay is much more expensive overall. I got a few parts from there (like breadboards and wire strippers) but all my electronic components I got from digikey. I live in Canada though, this may not be true where you are frpm!
If you keep buying them, eventually the sum will overflow, making it cost nothing.
Thanks from Texas.
Every single time you bring out some diagrams or components, I just keep waiting for you to say 'Here's some I prepared earlier'
It never came.
I think you put in the first 74LS86 XOR chip in backwards.
At the beginning yes, but it was fixed later in the video.
Is it wrong that I find it annoying that the right most XOR chip is not moved one row to the right so that power and ground would line up :D
3mm LEDs are an alternative to lengthy LED legs.
hi ben,im also building this computer and wanted to know how you added the jump,jumpcarry, and store A instructions.
Could have used Square LED been easier to place next to each other! :)
how you are using those chips without pull down resistors makes me fascinating
Now I know what these special logic chips are for.
Great video series! What if we used a bus for the clock, instead of jumpers connecting multiple boards? Is that of any advantage?
Ben you've probably been told this before, but you nice neat circuits and you name go hand-in-hand: Ben Eater = Be Neater. Wait, is your name really Ben Eater?
I would have thought that the ALU, would have internal registers for the operands so they could be from memory or registers, but not really necessary in this simple implementation?
so THAT’S why those blue bus lines were that long.
and then perry the platypus, I take over the ENTIRE TRI-STATE BUFFER
love the reference to phineas and ferb
Where are you getting these parts? I've tried searching them in a couple different places but I can't find any I can buy. Is there a website anyone uses that has all the parts in this video series?
what do you exactly mean? breaboards, LEDs, ICs, wires... ? all of these you can buy at your nearest electronics shop / some RadioShack
Mouser and Jameco have these parts.
alexander kramer I get mine from eBay you could try mouser electronics I heard they have good stuff, if you order from China on eBay you can get free shipping
Farnell element14 is one place, RS components, ebay. I'm from the uk though.
In America you've got Radio Shack, in Australia you have Jaycar.
Does anyone know why the terminal columns are separated into groups of 5 rows? Seems inconvenient for the most part...
Totally optional Ben says…
I just know had Ben been in the same class as I learning Catgut cable tidying we’d have all left the class knowing the bar would be set beyond our skills 😂
Why don't you use 3 mm LEDs to fit all the LEDs, that is what I did.
There are also those neat LED ladders / bar graphs ;)
www.image.micros.com.pl/_icon_auto_s/olcl.dc-10ewa.jpg
+Bon Bon Yeah, I guess he could use that too. But you cannot connect it directly to ground from the chip.
Terima kasih.
If I put the A and B registers on one board, would it free up space for AND, OR, and right-shifting on the now-empty board?
My technical explanation of what wasn't working properly is that maybe some of the bulbs had blown in the bottom bit.
I would love to learn how to make these chips. With photolithography
How can I design an 8-bit adder block that can add any two 8-bit registers from a bank of 5 registers and
then
store the result again in any one of them.
Bit late in the day, (er... 3 years late), but you'd find using 3mm LEDs better, they fit much better for consecutive pinholes
I love your videos keep making more
What if you want add 2 negative numbers? you are only able to represent negative numbers in B register right?
Why don't you use rectangular LEDs?
Cool. But one question...
Can it run doom?
The LED problem is interesting. Do LEDs not come in a chip-like row that you can just snap into a breadboard?
You can get DIP-sized LED bars as well as small form-factor LEDs with 2.54mm lead spacing, but they're not always as versatile if you need to go directly from the main board area to ground, because breadboards differ sometimes in the spacing of the ground and power busses. It also of course just depends on what you have available to work with at the time.
Ah cool thanks for the info
i faced a problem with alu part. i bought a 74hc283 ic from shop and i connect the pin 8 to ground and the pin 16 to the vcc the voltage of pin 7,9,10,11,12,13,14,15 is high and the voltage of the pin 1,2,3,4,5,6 is 0 why it is happening? as far as i know 74hc283 is a binary adder. it also showing wrong output. the ic become hot when i connect the input pins. Basically the out put pin 9,10,13 always high whatever the input is. pin 1,2,3,4,5,6 always low. I am stuck into this from two days. Anyone please help me.
Why don't we need any negation for the A register?
To make sense of the comment take the "to cause the counters" after " By using instructions in memory" out of the comment.
addictive watching!
Hey Ben! Please can you create a playlist with those "build computer" videos? I can't found the pattern
They are pretty much in sequence when you view them by date. But yeah, a playlist would be a cool thing to have.
3 Years later and i am watching these videos via his playlist. ;)
sorry to ask but, up until this point, you have 6 bread boards but this module plus the clock is only 5. am i missing one? do i need to go out and buy another one?
Noob recommendation, watch the entire video before wiring. remember to have space for resistors. change the order of the wiring to suit you. so its easier to get in and out while seeing what is happening while disturbing the other wires as little as possible
4:10 *snap* Mmhkay
Something that occurs to me, why use subtraction? Seems like a dumb question but I have been have fun with a different kind of math and in that math, there is no subtraction, nor even negative numbers. Seems like it would be better that way
I have a question: istnt this ALU able to do just A - B? What if I want to do B - A? Should we not have then the XOR gates also next to the A register and have SUB_A and SUB_B signals?
I taught about this too. If you wanted to calculate the difference between 7 and 5 you ALU would output 2 as expected. But in you case the calculation would be 5-7 which is -2, thats just your result invertet. In binary a two is 0010 and a negative 2 would be in 1s comeliment 1101. So I was thinking that maybe in that case you could just build an inverter for all bits. Of course you have to converte that in 2s complement at the end.
I had the same thought would you swap the data between addresses before you did the operation?
Than just load the walue you want to subtract to the b and not to the a
During sections where video is sped up, there’s this very faint and a little bit bizarre audio in the background.
Likely electrical noise from whatever power source he's using.
great vx, not gotta be anyx or carefux tho
I did a few rough calculations and a sim for the adder portion of the ALU. A kogge-stone adder for 16bits built with 74HC 86/32/08 chips came out 192 nS (max 4.5v) and 94 nS (typ 5V 15pF load). A 74HC283 16 bit ripple carry cct came out 184 nS and 92 nS typ. So 192/94 nS vs 184/92 nS. This seems to be the breakpoint. At 32 bits the numbers are 228/112 vs 368/184 nS i.e. 60% speed improvement. However a KS adder with 32 bits is a lot of 74HC chips so capacitance will drop the speed improvements. All bets are off if it's implemented into a gate array - use the KS. For up to 16bits I would just use ripple carry and 74HC283's.
In which video does he build the A register and the B register?
Nice hearty gulp at 12:46
How do you directly connect the LEDs to the various signal lines? Don't you need dropper resistors for them?
Check the data sheets. Depending on the chip those resistors are 'built in'. I believe he covered it in previous video. I may be mistaken however. Check the chip data sheets.
@@drzorbo3770 Well, the inputs do have internal pull-up resistors, but that's pretty much it, the output is just either shorted to ground, or shorted to Vcc.
Hi, To introduce multiplications would you design another ALU with ie. SN74284 or how could this be integrated in this one?
Markus Rohner you could achieve multiplication by repeated addition. It would be costly but to do 5x7 you can just add 7 into an empty register 5 times.You can use another register to store a count and compare to see if you've added enough times.
Madmaxx made his ALU with a couple more functions (AND and OR I believe). Is there a reason not to?
This is a demonstration of how a CPU works and how you can build one. I don't think the intention was to build the most feature packed CPU possible.
saved my CS degree
my xor gates somehow have a slight current in the inputs when no inputs are on. Can someone help?
nevermind. The current doesn't matter. My problem was one of the inputs just didn't work
Yay no dislikes