74 ms·
> the 6502 is a simple 16 bits processor I don't think ability to address 64k means the CPU is 16 bit. The 6502 is a very 8 bit processor AFAIK. The main regis
by antirez 8y ago
> the 6502 is a simple 16 bits processor
I don't think ability to address 64k means the CPU is 16 bit. The 6502 is a very 8 bit processor AFAIK. The main registers are 8 bit, most operations work on 8 bit registers.
- royjacobs 8y agoI presume he's referring to the address space? It's a bit confusing, indeed.
- antirez 8y agoSorry you read the comment one second before I updated it, I clarified how AFAIK addressing 16 bits of memory does not make it a 16 bit processor.
- Drakim 8y agoIndeed, the Nintendo Entertainment System (NES) can also address 16 bits of memory and is one of the most famous "8 bit systems" around.
- vidarh 8y agoIn fact the NES uses a 6502-derived core (the Ricoh 2A03/2A07 CPUs contain a licensed 6502 core with some minor tweaks)
- royjacobs 8y agoRight :) I think when the Atari Jaguar was released they used the same kind of logic to market it as a 64-bit system since technically some part of it was using 64-bit processing, but the CPUs were still 32-bit. It's just nitpicking though, I thoroughly enjoy Fabien's writing and I can highly recommend the couple of books he's written about reverse engineering Id Software games. On HN people seem to confuse "hacking" with "growth hacking" a lot of times, and Fabien's writing is thankfully on the right side of that fence.
- anentropic 8y agoand the "ST" in Atari ST stood for "sixteen/thirty-two" referring to the 16-bit 68000 processor and ... 32-bit something else, I forget :)
- vidarh 8y agoThe 68000 CPU has a 32-bit address space [1], 32-bit internal data bus, and 32-bit registers, but a 16-bit external data bus and 16-bit ALU, so it's sometimes seen as a bit of a hybrid and sometimes referred to as a 16/32 bit CPU. [1] but only 24 address lines, which led to "interesting" bugs when people had written code that used the top byte of addresses for other purposes and their code was then run on a 68020 or higher.
- flohofwoe 8y agoI think it's best to go with the "external data bus size", which is 8-bit on the processors typically known as "8-bit processors" (6502, Z80, i8080, 6809 etc...). Those processors can read one 8-bit byte in one memory access. For instance, even though the Z80 has 16-bit registers, can load 16-bit values from memory (and even has some 16-bit arithmetic operations), a 16-bit memory access takes 2 separate memory accesses through the 8-bit data bus. By that definition the 68000 and 8086 are 16-bit processor (which makes sense), however the stripped down variants 68008 and 8088 would be considered 8-bit processors... and this is where this simple model breaks down ;)
- dspillett 8y ago"bitness" is defined by the natural data size of common operations. The Z80 is 8-bit as most of its internal operations work over this data size and its registered are 8-bit. It can perform some 16-bit operations over two registers, but this is less natural to the design (based upon the 8-bit 8080). The 8088 is 16-bit as its registers are naturally 16-bit even though there are also ways to address them as 8-bit halved. While the distinction between registers that are 8-bit but can be paired (Z80) or 16-bit but can be halved (8086/8088) may seem arbitrary on its own but looking into the instructions available and how they perform makes which side a chip sits on more obvious. How much can be read at once is not the right differentiator, as it is essentially an interface issue. The internals of the 8088 are the same as those of an 8086, apart from those at the interface which break the 16-bit requests into 8-bit ones, they just have to wait longer for the signal that data has arrived/left. Another common one that can confuse is the 80386SX: these are 32 bit chips (essentially the same design as the original 80386, latterly referred to as 80386DX) with a 16-bit data bus (so 32-bit requests are split as seen with 16-bit ones with the 8088) and a 24-bit address bus (limiting them to 16Mb physical memory like 80286 chips). These limited bus sizes allowed them to be used on motherboard designs originally intended for older 80286 units. Other confusions come from specialist instructions: floating point operations using larger (40- & 80-bit) special purpose registers, SIMD instructions (such as those in the MMX set, introduced on 32-bit Pentium lines, operated over 64-bit collections of smaller values), etc. Sometimes it works the other way around: the original Pentium lines (up to the Pentium 4) were 32-bit chips even though they had a 64-bit data bus (this made loading data into the L1 cache faster, rather than marking the chip out as 64-bit overall) and some 64-bit instructions.