1
\$\begingroup\$

What makes a CPU be called for example: "this CPU is n bits"?

\$\endgroup\$

marked as duplicate by dim, Chris Stratton, W5VO Jan 2 '17 at 21:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    \$\begingroup\$ 8088 has a 16 bit internal data bus (the registers are 16 bit). The wideness of the external data bus doesn't count. \$\endgroup\$ – dim Jan 2 '17 at 20:34
  • 2
    \$\begingroup\$ Also: electronics.stackexchange.com/questions/32110/… \$\endgroup\$ – dim Jan 2 '17 at 20:35
  • 1
    \$\begingroup\$ @zack1544 Yes. The address bus, for example, was 20 bits on the 8088 (it could address 1Meg). But this doesn't make it a 20-bit CPU. \$\endgroup\$ – dim Jan 2 '17 at 20:42
  • 1
    \$\begingroup\$ @zack1544 Yes, generally (but there are particular cases, e.g. the Z80 like Chris mentioned, which was 8 bit but had a 4 bit ALU). So, more accurately, what counts is the size of the general purpose registers (what the developer actually sees). \$\endgroup\$ – dim Jan 2 '17 at 20:46
  • 2
    \$\begingroup\$ @WoutervanOoijen - No. The 8080 was 8 bit, but the Z80 was actually 4-bits in the ALU - a very clever, and successful strategy by the designers. \$\endgroup\$ – Chris Stratton Jan 2 '17 at 21:50
4
\$\begingroup\$

Short answer: There is no universally accepted definition.

Less short answer: If the CPU supports all of the basic primitives on a 16-bit datatype, then it would probably be considered sixteen bits by the majority of users.

This has been a "holy war" since 1976 or so, and there is no "right" or "wrong" answer. Was the 8088 sixteen bits? Probably. So, was the Z80? It had some sixteen bit math, and an 8-bit databus. (Probably not -- the Z80 had no native 16-bit logical instructions, only add and subtract).

The question surged again when the 68000 with its 32-bit registers, and rich set of 32-bit operations appeared, but an internal 16-bit ALU and an external 16-bit databus (and then just to throw MORE confusion, the 68008 variant, with an 8-bit databus).

\$\endgroup\$
  • \$\begingroup\$ In some key respects, the Z80 was actually a 4-bit machine implementing the instruction set of an 8-bit one. \$\endgroup\$ – Chris Stratton Jan 2 '17 at 20:38
  • \$\begingroup\$ The 68008 is kingwaffles! For all of the reasons. That's all my opinion on this. Well that, and that most embedded people I know agree with the internal Bus+Alu win over other aspects where possible/applicable. \$\endgroup\$ – Asmyldof Jan 2 '17 at 20:43
  • 1
    \$\begingroup\$ Is 'kingwaffles' good or bad? \$\endgroup\$ – Lawrence NK1G Jan 2 '17 at 20:49
  • 2
    \$\begingroup\$ @ChrisStratton: I don't think calling the Z80 a 4-bit machine is sensible. That's like calling the 12-bit PDP-8/S a one-bit machine. \$\endgroup\$ – Ken Shirriff Jan 2 '17 at 21:22
  • 1
    \$\begingroup\$ @WoutervanOoijen - while reverse-engineering the Z-80 from die photos, I found that it uses a 4-bit ALU, even though it's an 8-bit chip. Data goes through the ALU in two passes. Details: righto.com/2013/09/the-z-80-has-4-bit-alu-heres-how-it.html \$\endgroup\$ – Ken Shirriff Jan 2 '17 at 23:18
4
\$\begingroup\$

The bitness of a CPU is the width of the word it can process natively as a whole. This is generally the width of the registers and the ALU. For example, PIC 10, 12, 14, 16, 17, and 18 are all 8 bit processors. PIC 24, 30, and 33 are 16 bit processors, and PIC 32 are 32 bit processors.

Note that ALU and register width isn't the only thing commonly specified in bits for a processor. The instruction word width, or at least the width of the instruction data bus is another measure. This doesn't need to be the same as the ALU width, and often isn't. The same "8 bit" PICs listed above have different instruction widths. Sometimes you hear this referred to as the "core" width. For example, the original PIC 10 and 12 were 12 bit core machines, the mainstream PIC 16 has a 14 bit core, and the PIC 18 a 16 bit core, despite each of these being "8 bit" processors.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.