My brand new 4-bit computer
My brand new 4-bit computer
Just got my newest computer, a GMC-4 which has a 4-bit processor. Yep, 4-bit! The computer is actually part of a glossy magazine and toy combination which is part of a science for adults series and this particular issue was about early computing. It's a shame I can't read Japanese as the magazine looked half interesting. The English manual is here:
http://otonanokagaku.net/english/manual ... puter.pdf
On page 12 you see the OS calls - the opcodes from E0 to EF.
What you don't see from the manual or web images are the little exposed metal pads that you could use to hack the machine by soldering things onto the board. Quite cool for a cheap toy! After some surfing I discovered that the GMC-4 seems to be the same as this microcomputer trainer.
All in all, not as much fun as an Arduino but still a good time killer and worth the money just to say you own a 4-bit machine.
ps. I bought it on ebay. Search for Gakken 4-bit computer and you'll probably see it.
http://otonanokagaku.net/english/manual ... puter.pdf
On page 12 you see the OS calls - the opcodes from E0 to EF.
What you don't see from the manual or web images are the little exposed metal pads that you could use to hack the machine by soldering things onto the board. Quite cool for a cheap toy! After some surfing I discovered that the GMC-4 seems to be the same as this microcomputer trainer.
All in all, not as much fun as an Arduino but still a good time killer and worth the money just to say you own a 4-bit machine.
ps. I bought it on ebay. Search for Gakken 4-bit computer and you'll probably see it.
Every universe of discourse has its logical structure --- S. K. Langer.
Re: My brand new 4-bit computer
Hmm, the only idea in it is "8+ -bit machines are too mainstream", isn't it?
Re: My brand new 4-bit computer
I've sold it short. It's an educational tool. The magazine and the computer, along with user supplied screwdriver and 3*AA battery, gives you everything you need to go from not having a clue about computers to assembly language programming. I can only go from what the pictures in the magazine tell me - I can't read Japanese - but it seems to cover binary and hex representations of numbers, basic gates (AND, OR, NOT), how to use these basic gates to build a half adder and a full adder, a description of the CPU datapath (the control unit isn't covered graphically, might be written about but again I can't tell), how to create a flow chart, how to convert a flow chart into opcodes and machine code, and how to enter, edit, and run your programs.Nable wrote:Hmm, the only idea in it is "8+ -bit machines are too mainstream", isn't it?
Actually, it's not too dissimilar to what I used at school to do the same sort of things. To be honest I'm not sure if this is the exact 6502 trainer we used but it's close enough.
Every universe of discourse has its logical structure --- S. K. Langer.
Re: My brand new 4-bit computer
So, you're just refreshing your old days knowledge? It sounds not very intriguing when somebody reads a book once more. There should be something new. Is it there?bwat wrote:Actually, it's not too dissimilar to what I used at school to do the same sort of things. To be honest I'm not sure if this is the exact 6502 trainer we used but it's close enough.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: My brand new 4-bit computer
Being Nostalgic is different from reading a book once more. Do any of you guys know if 4-bit computers are still in use? You know, in Software Industry anything can happen...embryo wrote:So, you're just refreshing your old days knowledge? It sounds not very intriguing when somebody reads a book once more. There should be something new. Is it there?bwat wrote:Actually, it's not too dissimilar to what I used at school to do the same sort of things. To be honest I'm not sure if this is the exact 6502 trainer we used but it's close enough.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: My brand new 4-bit computer
I'm a programmer, so if it can be programmed, then I want one. I justify it by calling it deliberate practice. The older machines have constraints which lead to techniques being used that you just don't see anywhere else. As an example: on this machine, and on another 8-bit kit computer I've got coming my way, the designers use "dynamic lighting", one output port is demultiplexed between several groups of LEDs as there are so few ports. You don't see that much these days!embryo wrote:So, you're just refreshing your old days knowledge? It sounds not very intriguing when somebody reads a book once more. There should be something new. Is it there?bwat wrote:Actually, it's not too dissimilar to what I used at school to do the same sort of things. To be honest I'm not sure if this is the exact 6502 trainer we used but it's close enough.
It's definitely not nostalgia. Entering machine code by hand isn't fun.Bender wrote: Being Nostalgic is different from reading a book once more.
Every universe of discourse has its logical structure --- S. K. Langer.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: My brand new 4-bit computer
For me it definitely is.Entering machine code by hand isn't fun.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: My brand new 4-bit computer
Have you done a lot of hand machine-coding? (Not assembler, machine code.)Bender wrote:For me it definitely is.Entering machine code by hand isn't fun.
It really isn't fun. Even less so if you have to do it by flipping switches on a front panel.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: My brand new 4-bit computer
I don't know if you'll consider that really machine-code but I have programmed in Java ByteCode, (with typing instructions by hand, not much but I do see people who're 30-40+ here, and they may have programmed in machine code in absence of compilers/assemblers).iansjack wrote:Have you done a lot of hand machine-coding? (Not assembler, machine code.)Bender wrote:For me it definitely is.Entering machine code by hand isn't fun.
It really isn't fun. Even less so if you have to do it by flipping switches on a front panel.
Sure it's difficult, but sometimes difficult things can get fun.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: My brand new 4-bit computer
The problem comes when you input the wrong byte. With a text editor you can see it and fix it easily. With a numeric keypad and a couple of 7-segment displays, or as iansjack describes, switches and LEDs, you have to go through each address one at a time and compare the memory contents with your binary program looking for some discrepancy that explains your program's erroneous behaviour. It's fun the first time but you soon learn to be careful. You also learned to put in a bunch of NOPs at strategic places so you could patch code in situ. I think alot of younger programmers aren't sure why we have NOPs.Bender wrote:I don't know if you'll consider that really machine-code but I have programmed in Java ByteCode, (with typing instructions by hand, not much but I do see people who're 30-40+ here, and they may have programmed in machine code in absence of compilers/assemblers).
Sure it's difficult, but sometimes difficult things can get fun.
Our teacher made us hand assemble everything and that was fine for small programs but, again, you learned to be careful calculating your jump offsets and your translation from assembly to machine code - line by line, check and double check. We never really did more than a 50 or so lines of assembly IIRC. The funny thing is we had machines which could have run assemblers for us!
Every universe of discourse has its logical structure --- S. K. Langer.
Re: My brand new 4-bit computer
Nice. In the early 80's a Dutch popular-scientific magazine distributed those, or something similar. My introduction to assembly. Calculating machine code manually sure was a pita but it was a sound introduction into how CPU's work. For educational purposes, I still think that's very valuable.bwat wrote:Actually, it's not too dissimilar to what I used at school to do the same sort of things.
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: My brand new 4-bit computer
That could be more difficult than I imagine, it was a tiring job sometimes?The problem comes when you input the wrong byte. With a text editor you can see it and fix it easily. With a numeric keypad and a couple of 7-segment displays, or as iansjack describes, switches and LEDs, you have to go through each address one at a time and compare the memory contents with your binary program looking for some discrepancy that explains your program's erroneous behaviour.
You just answered my doubt about what I called a "useless" instruction which would've been a gift to programmers at that time.You also learned to put in a bunch of NOPs at strategic places so you could patch code in situ. I think alot of younger programmers aren't sure why we have NOPs.
Assemblers and Compilers were proprietary during that time (I guess), and only accessible to major corporations, was that the reason you were made to program in machine code, or ....?Our teacher made us hand assemble everything and that was fine for small programs but, again, you learned to be careful calculating your jump offsets and your translation from assembly to machine code - line by line, check and double check. We never really did more than a 50 or so lines of assembly IIRC. The funny thing is we had machines which could have run assemblers for us!
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)
Re: My brand new 4-bit computer
Let me guess, you've never had major problems with pointers in C. We probably worked on the same trainer. I'm not 100% sure it was a KIM-1 we had but it was pretty close. I actually remember it being more cardboard than circuit board!Hobbes wrote:Nice. In the early 80's a Dutch popular-scientific magazine distributed those, or something similar. My introduction to assembly. Calculating machine code manually sure was a pita but it was a sound introduction into how CPU's work. For educational purposes, I still think that's very valuable.bwat wrote:Actually, it's not too dissimilar to what I used at school to do the same sort of things.
We had BBC model Bs and according to wikipedia BBC basic had a built in assembler. We could have taken turns on the BBC just like we had to take turns on the machine we were programming. They probably thought that doing it by hand would teach us more. I can still remember certain 6502 opcodes after all these years.Bender wrote:Assemblers and Compilers were proprietary during that time (I guess), and only accessible to major corporations, was that the reason you were made to program in machine code, or ....?
Every universe of discourse has its logical structure --- S. K. Langer.
- LieutenantHacker
- Member
- Posts: 69
- Joined: Sat May 04, 2013 2:24 pm
- Location: Canada
Re: My brand new 4-bit computer
From the post title I had assumed you meant that you made your own 4-bit computer (from scratch). I'm going to assemble an 8-bit one, and use a 16x32 LED-matrix for graphical display. Will take quite a while, but it's my first goal!
The desire to hack, with the ethics to code.
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: My brand new 4-bit computer
That's pretty cool. You might also be interested in the Parallax Propeller - http://www.parallax.com/microcontrollers/propeller-original-equipment-manufacturer-oem 8 cores! That seemed so cool back in 2006.
When you see microcontrollers that are $1 each, I've wondered about building a 1024-core computer of 1 MHz processors - until I researched into wiring the thing together!
When you see microcontrollers that are $1 each, I've wondered about building a 1024-core computer of 1 MHz processors - until I researched into wiring the thing together!
My OS is Perception.