They hold important information information that enables instructions to be processed. These pieces of data allow the CPU to quickly fetch and then execute instuctions from RAM, and also to write data to RAM. You can think of each register as a box which holds a piece of data useful to the CPU. The Little Man computer and SimCom are available on the Internet and will help you understand how programming (the software) works with the CPU, RAM and the registers (the hardware).Ī Von Neumann CPU (the type of CPU you get in nearly all personal computers) has a number of 'registers'. If you are interested in making such a counter yourself, you can now look at Episode 26.Ĭoncepts discussed: object interaction, constructor, field, local variable, assignment, external method callĭownloads: trick-the-turtle-v4.zip, Counter.java, counter.Understanding how the CPU works, registers and low-level programming.
Greenfoot counter how to#
Update: This episode shows how to use a ready-made counter object. So if you have a question, or something you want explained: tell me in the comments, and I’ll try to fit it in in one of the future episodes. Oh, and one more thing: I am showing how to implement a score counter here, because several people have asked me how to do that. And of course - as always - after watching: Fire up Greenfoot, and get coding yourself! So sit back, switch your brain on, and watch.
Greenfoot counter professional#
Yes, we’re slowly cranking up to a more professional level here. We’re throwing around terms like “object references” and “constructors”. (It could actually also have been titled “Object interaction – a second look”.) We started to look at object interaction a little bit in Episode #15, and now we’re really getting stuck in.
This episode deals with an incredibly important concept: object interaction. I was at a conference for a week or so (Melbourne, other side of the world!), and then I had to get settled into my time zone again, but I’m back! I still feel a little jet-lagged, so if my voice sounds even more drab than usual in this episode – I blame the time zones. Welcome back after a little break in putting out new episodes. Habe Mut, dich deines eigenen Verstandes zu bedienen.