1

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

  • The number of bits in its data bus... Wait a second, I'm pretty sure I can find a duplicate question for this... – dim Jan 02 '17 at 20:29
  • @dim that what i thought too, but in Wikipedia the "Intel 8088" cpu is considered to be a 16 bits CPU, even that it's data bus width is only 8 bits. – Maykel Jakson Jan 02 '17 at 20:31
  • It says the Intel 8088 has an external 8 bit data bus. – zack1544 Jan 02 '17 at 20:33
  • From Wikipedia: "Introduced on July 1, 1979, the 8088 had an 8-bit external data bus " – zack1544 Jan 02 '17 at 20:34
  • 1
    8088 has a 16 bit *internal* data bus (the registers are 16 bit). The wideness of the external data bus doesn't count. – dim Jan 02 '17 at 20:34
  • 2
    Also: http://electronics.stackexchange.com/questions/32110/what-are-the-properties-of-an-n-bit-microcontroller – dim Jan 02 '17 at 20:35
  • But how does an 8 bit processor address more than 256 bytes of RAM? I have always thought about this question. Would the address bus's width be more than 8 bits? – zack1544 Jan 02 '17 at 20:40
  • 1
    @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. – dim Jan 02 '17 at 20:42
  • @zack1544 there are 3 players, the registers, the address bus, and the data bus, the 8088 has 8-bits data bus, and 20-bits address bus, so it can address any 8-bits (one byte) on a 20-bits (1M) address range. – Maykel Jakson Jan 02 '17 at 20:43
  • Oh ok yes it makes sense. So in an 8 bit processor the inputs to the ALU are both 8 bits wide? – zack1544 Jan 02 '17 at 20:44
  • 1
    @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). – dim Jan 02 '17 at 20:46
  • What makes a CPU called an "n-bit CPU"? The marketing department. (I mean this seriously.) – Ken Shirriff Jan 02 '17 at 21:25
  • @dim "the Z80 ... which was 8 bit but had a 4 bit ALU"?? No way, 8080 and Z80 were 8-bit chips (ALU, datapaths, shortest instructions, and 'main' registers). – Wouter van Ooijen Jan 02 '17 at 21:43
  • 2
    @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. – Chris Stratton Jan 02 '17 at 21:50

2 Answers2

4

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).

Lawrence NK1G
  • 501
  • 2
  • 5
  • In some key respects, the Z80 was actually a 4-bit machine implementing the instruction set of an 8-bit one. – Chris Stratton Jan 02 '17 at 20:38
  • 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. – Asmyldof Jan 02 '17 at 20:43
  • 1
    Is 'kingwaffles' good or bad? – Lawrence NK1G Jan 02 '17 at 20:49
  • It's on par with krautlordly. But somewhat flopsified. – Asmyldof Jan 02 '17 at 20:56
  • 2
    @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. – Ken Shirriff Jan 02 '17 at 21:22
  • @KenShirriff it seems perfectly valid to call that a 1-bit machine with 12-bit programming model, especially in the situations where that fact made itself apparent. – Chris Stratton Jan 02 '17 at 21:28
  • @ChrisStratton: can you give a reference for the Z80 being a 4-bit machine in any sense? – Wouter van Ooijen Jan 02 '17 at 21:46
  • @WoutervanOoijen - while it's a fact I was ignorant of in the era when I used one (given the 8-bit instruction set), it's well documented and prominent in writeups of the origins of Zilog and the part. – Chris Stratton Jan 02 '17 at 21:47
  • 1
    @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: http://www.righto.com/2013/09/the-z-80-has-4-bit-alu-heres-how-it.html – Ken Shirriff Jan 02 '17 at 23:18
4

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.

Olin Lathrop
  • 310,974
  • 36
  • 428
  • 915