Saturday, July 2, 2016

Building a Modern Computer from First Principles / Computer Architecture

Finished project 1 of the Coursera course "Build a Modern Computer from First Principles: From Nand to Tetris". Made 15 logic circuits given just nand. Next up - designing an ALU. Been looking at Voxel.js to go along with the Three.js javascript coding I've been doing. It's basically moving toward a minecraft like game in the browser. The server is done with Node.js (I'm still learning about that). The cool thing about all the above is that if I get enough modules together, I can duplicate what that guy did with the Minecraft computer (which was inspired and educated by the same class I'm taking - mentioned above), and put it all out as a self contained javascript set of modules, then use it for my first project for FreeCodeCamp. Here are the chips I've written on my github repo so far for this course: https://github.com/DiginessForever/randomCode/tree/master/LogicGateHDL ----------------------- From earlier: This course is happening soon: "Build a Modern Computer from First Principles: From Nand to Tetris (Project Centered Course)", hosted on Coursera, originated from Hebrew University of Jerusalem. I highly recommend it. I have an old work acquintance who had a course that was based on the book ("The Elements of Computing Systems: Building a Modern Computer from First Principles") (the second professor listed on the course page, Noam Nissan wrote the book). The acquintance was pushing me again on it, which got me to make it through the boolean logic section - it also guides you through making a compiler and I think teaches you about computer hardware architecture at the electronics level, as well as goes up the logic stack from assembler to higher level languages. I learned quite a bit from this book, even though I have not finished it yet or even gotten halfway through. My digital electronics class at SWIC also got into boolean logic / logic gates, but this book takes it to the next level. The course ought to be quite good. https://www.coursera.org/learn/build-a-computer?recoOrder=3&utm_medium=email&utm_source=recommendations&utm_campaign=recommendationsEmail~recs_email_2016_05_22_17%3A57 Here is the original companion website: http://www.nand2tetris.org/, just in case anyone is interested but doesn't have the time in the Coursera course's time frame. The original book itself, I could not find on Amazon, but here it is at MIT Press: https://mitpress.mit.edu/books/elements-computing-systems Here is the other author of the book describing its purpose in a TED talk: http://www.ted.com/talks/shimon_schocken_the_self_organizing_computer_course I think in my upcoming project as part of the FreeCodeCamp map, I will create a webpage with my CV, and this will be one of the books I list as being something I recommend (along with Who Is Fourier and a few others). -------------------- 28 Feb, 2016: Wow, found this video showing one of the first mechanical computers. Someone in the 1800s designed it to do addition and multiplication using brass gears. Even better, I noticed the guy introducing it in the video is Clifford Stoll. He wrote of his experience tracking one of the first computer hackers in Cuckoo's Egg. http://www.cnet.com/news/watch-1895s-millionaire-machine-do-some-astounding-mechanical-calculations/ ------------------- 3 Jan, 2016: This project is cool because it shows a basic computer in an IC, which you can wired up in a protoboard. Also, it shows a wiring diagram for hooking up to VGA. It's kind of expensive for an IC ($25), but considering it's actually a tiny computer...Here's the company's site for the IC: http://www.espruino.com/ http://www.instructables.com/id/Make-Your-Own-Home-Computer/ ------------------ 25 Mar, 2015: My electronics class teacher broke down diodes and transistors last night - it was pretty neat, he talked about doping levels and showed each connection's bias direction in relation to what the current was at the gate (or voltage for field effect transistors). He also talked about the history of the transistor invention process and how the University of Illinois was involved. I still need to catch up on homework and then do a review of a lot of the reading for this class. Comments: Gabrielle - Doping levels? Explain? Me: OK, so a transistor is actually two diodes. A diode keeps electrical current running in only one direction in a circuit (positive to negative or negative to positive). An alternating current goes one direction, then the other. On a graph, that looks like a sine wave, when it's positive, it's going negative to positive, and when it's negative, it's going positive to negative. That's the direction the current is moving (a bunch of little electrons - they're not really moving, they're exchanging their energy). Diodes are used to keep current going only one way by blocking it when it's trying to go the other way. So in the simplest case, they are filters. Building on that, you can arrange them in a way that they can amplify signals (filtering part of the signal while adding two signals together when they are going a certain way). You can also use them to only pass current when it's a certain strength. Combine that with a capacitor, and you can make an oscillator (clock signal, how fast it pulses is based on the capacitor). Put a bunch of the diodes together and you can start to do things like logic (logic gates) that are more complicated where you can do basic value comparisons. So what is a diode? It's just two pieces of doped silicon up against each other with wires leading to both ends - the current will have to try to go through the junction (it'll be a P-N junction, getting to that). What is doping? Well, it's when you take pure silicon (which has an extremely high resistance) and mix other material types with it that bring its resistance down (it'll be either a P type material or N type - both are ions in that they have an extra electron (N type) or are missing an electron (P type) in their atoms' valence bands - you can actually see which atoms will have these properties just by looking at a table of elements). Mixing these materials with silicon gives you a wafer that's an N type or P type. If you put these wafers together, you have a P-N junction, or a diode. When you link a circuit to the junction, with one wire going in on the N side and one going to the P side, then try to run current through it, if you have current trying to go in the N side, it's not going to like it because the N side already has all the electrons it can take. It'll resist strongly. However, if you have current going in to the P side, it'll allow it through, and not only that, but because the P side is pulling electrons toward it from the N side, you'll get a ripple effect where the energy flows all the way through the whole junction. Me: http://www.circuitstoday.com/understanding-the-pn-junction Me: What I wrote above was a simplified description of how the PN junction works - as you get more in detail, you'll see that current won't flow until you put a certain amount of voltage on it, and if you put too much voltage on it, you'll burn it up. Each diode type has its own characteristic curve (volts to current) that tells you how much you need to pass current and how much will destroy the diode. It has a different curve based on whether you are trying to make the current go through the P or N junction first (reverse or forward biased).

No comments:

Post a Comment