Most active commenters
  • larsbrinkhoff(3)

←back to thread

288 points Twirrim | 22 comments | | HN request time: 1.54s | source | bottom
1. pjdesno ◴[] No.41874875[source]
During an internship in 1986 I wrote C code for a machine with 10-bit bytes, the BBN C/70. It was a horrible experience, and the existence of the machine in the first place was due to a cosmic accident of the negative kind.
replies(6): >>41874970 #>>41875234 #>>41875248 #>>41875733 #>>41875834 #>>41876076 #
2. csours ◴[] No.41874970[source]
Somehow this machine found its way onto The Heart of Gold in a highly improbable chain of events.
3. WalterBright ◴[] No.41875234[source]
I programmed the Intel Intellivision cpu which had a 10 bit "decl". A wacky machine. It wasn't powerful enough for C.
4. Taniwha ◴[] No.41875248[source]
I've worked on a machine with 9-bit bytes (and 81-bit instructions) and others with 6-bit ones - nether has a C compiler
replies(2): >>41875661 #>>41875983 #
5. asveikau ◴[] No.41875661[source]
I think the pdp-10 could have 9 bit bytes, depending on decisions you made in the compiler. I notice it's hard to Google information about this though. People say lots of confusing, conflicting things. When I google pdp-10 byte size it says a c++ compiler chose to represent char as 36 bits.
replies(1): >>41876849 #
6. aldanor ◴[] No.41875733[source]
10-bit arithmetics are actually not uncommon on fpgas these days and are used in production in relatively modern applications.

10-bit C, however, ..........

replies(2): >>41875796 #>>41878419 #
7. eulgro ◴[] No.41875796[source]
How so? Arithmetic on FPGA usually use the minimum size that works, because any size over that will use more resources than needed.

9-bit bytes are pretty common in block RAM though, with the extra bit being used for either for ECC or user storage.

8. kazinator ◴[] No.41875834[source]
C itself was developed on machines that had 18 bit ints.
replies(1): >>41876858 #
9. corysama ◴[] No.41875983[source]
The Nintendo64 had 9-bit RAM. But, C viewed it as 8 bit. The 9th bit was only there for the RSP (GPU).
10. Isamu ◴[] No.41876076[source]
I wrote code on a DECSYSTEM-20, the C compiler was not officially supported. It had a 36-bit word and a 7-bit byte. Yep, when you packed bytes into a word there were bits left over.

And I was tasked with reading a tape with binary data in 8-bit format. Hilarity ensued.

replies(2): >>41876112 #>>41876915 #
11. bee_rider ◴[] No.41876112[source]
Hah. Why did they do that?
replies(1): >>41877442 #
12. larsbrinkhoff ◴[] No.41876849{3}[source]
PDP-10 byte size is not fixed. Bytes can be 0 to 36 bits wide. (Sure, 0 is not very useful; still legal.)

I don't think there is a C++ compiler for the PDP-10. One of the C compiler does have a 36-bit char type.

replies(2): >>41877850 #>>41879553 #
13. larsbrinkhoff ◴[] No.41876858[source]
B was developed on the PDP-7. C was developed on the PDP-11.
14. Ballas ◴[] No.41876915[source]
That is so strange. If it were 9-bit bytes, that would make sense: 8bits+parity. Then a word is just 32bits+4 parity.
replies(3): >>41877834 #>>41878226 #>>41881333 #
15. mjevans ◴[] No.41877442{3}[source]
Which part of it?

8 bit tape? Probably the format the hardware worked in... not actually sure I haven't used real tapes but it's plausible.

36 bit per word computer? Sometimes 0..~4Billion isn't enough. 4 more bits would get someone to 64 billion, or +/- 32 billion.

As it turns out, my guess was ALMOST correct

https://en.wikipedia.org/wiki/36-bit_computing

Paraphrasing, legacy keying systems were based on records of up to 10 printed decimal digits of accuracy for input. 35 bits would be required to match the +/- input but 36 works better as a machine word and operations on 6 x 6 bit (yuck?) characters; or some 'smaller' machines which used a 36 bit larger word and 12 or 18 bit small words. Why the yuck? That's only 64 characters total, so these systems only supported UPPERCASE ALWAYS numeric digits and some other characters.

16. p_l ◴[] No.41877834{3}[source]
7 bits matches ASCII, so you can implement entire ASCII character set, and simultaneously it means you get to fit one more character per byte.

Using RADIX-50, or SIXBIT, you could fit more but you'd lose ASCII-compatibility

17. eqvinox ◴[] No.41877850{4}[source]
Do you have any links/info on how that 0-bit byte worked? It sounds like just the right thing for a Friday afternoon read ;D
replies(1): >>41878248 #
18. ◴[] No.41878226{3}[source]
19. larsbrinkhoff ◴[] No.41878248{5}[source]
It should be in the description for the byte instructions: LDB, DPB, IBP, and ILDB. http://bitsavers.org/pdf/dec/pdp10/1970_PDP-10_Ref/

Basically, loading a 0-bit byte from memory gets you a 0. Depositing a 0-bit byte will not alter memory, but may do an ineffective read-modify-write cycle. Incrementing a 0-bit byte pointer will leave it unchanged.

20. loup-vaillant ◴[] No.41878419[source]
10-bit C might be close to non-existent, but I've heard that quite a few DSP are word addressed. In practice this means their "bytes" are 32 bits.

  sizeof(uint32_t) == 1
21. asveikau ◴[] No.41879553{4}[source]
I was summarizing this from a Google search. https://isocpp.org/wiki/faq/intrinsic-types#:~:text=One%20wa....

As I read it, this link may be describing a hypothetical rather than real compiler. But I did not parse that on initial scan of the Google result.

22. otabdeveloper4 ◴[] No.41881333{3}[source]
8 bits in a byte exist in the first place because "obviously" a byte is a 7 bit char + parity.

(*) For some value of "obviously".