Live data from Hacker News

Show HN: A nibble-oriented CPU in Verilog to build a scientific calculator

github.com

41–46 of 46 posts

Re: Show HN: A nibble-oriented CPU in Verilog to build a scientific calculator

#42

Love this and love seeing people building their own hardware/software tools. I hope to carve out the time soon to be one. Calculators are a perfect project are there videos available?

I added a rather lousy video to the end of the chapter https://baltazarstudios.com/calculator-conclusion/

Creating the kind of quality video we're all used to seeing is beyond my skill level and ... motivation.

Re: Show HN: A nibble-oriented CPU in Verilog to build a scientific calculator

#43
post #17
post #5

My dad worked for HP from the mid-1970s through the mid-1990s. Needless to say, I used HP calculators in high school and college. The best things about having an HP calculator were the solid physical construction (the buttons on the 11C and 15C were awesome), the accuracy, and the fact that whenever your classmates asked to borrow your calculator they would recoil in horror when you asked them whether they knew RPN.…

> the buttons on the 11C and 15C were awesome What is the trick to engineering HP calculator keys? Nobody gets keys right like the old HP calculators. In this age of 3D printing and fast prototypes, we really ought to be able to crack this.

I was part of a group touring HP labs in the mid-1970s.

They showed us how they computed the key dimensions and typography with an (HP) minicomputer, then had it print out the commands for some kind of numerically controlled cutting machine on paper tapes using an old ASR33 teletype.

The cutting machine generated moulds for the injection moulding machines making the keys.

The keys are in two parts: light coloured digits and symbols and darker plastic forming the shape of the key itself and surrounding the lighter symbol plastic. As a result, they can be worn down but they can never wear out.

Re: Show HN: A nibble-oriented CPU in Verilog to build a scientific calculator

#44
post #5

My dad worked for HP from the mid-1970s through the mid-1990s. Needless to say, I used HP calculators in high school and college. The best things about having an HP calculator were the solid physical construction (the buttons on the 11C and 15C were awesome), the accuracy, and the fact that whenever your classmates asked to borrow your calculator they would recoil in horror when you asked them whether they knew RPN.…

I still have my dads old HP with the glowing red letters and all the functions. Not sure if we still have the charger. Not sure the battery is any good, but the calculator worked fine last time it was turned on decades ago. Any idea if this can be made to function again?

Yes probably. What model is it? I repair and restore old HP calculators. One thin about all the models from 1972 through the early 1980s that use a battery pack - do not power the calculator off the adaptor alone - these models used a working battery pack as part of the adaptor voltage "regulation" - if you power off the adaptor without the battery a much higher voltage will get into the calulator and can permanently damage it. If you dont have a working battery pack, the only way to test it is with a bench power supply set to a safe voltage. For many of these models I install a lithium battery system and USB-C charge port so we no longer have to mess around with old leaky batteries and HP's poor implementation for charging them. Some of the models that are like this are: 35, 45, 55, 65, 67, the 20-series (21, 22, 25 etc) and the 30-series (31E, 32E, 33E, 33C, 34C etc). After these, the "Pioneers" came out (11C, 15C etc) which dont use a power adaptor and are safe.

Re: Show HN: A nibble-oriented CPU in Verilog to build a scientific calculator

#45

Earlier quoted context omitted.

Intel 8080 already had DAA, so it could add BCD numbers. Because there was no BCD subtraction, that had to be done by an indirect method, e.g. by doing a nines' complement before a BCD addition. Zilog Z80 improved this, so that on it DAA could also be used after a subtraction, when it would correctly adjust the result for implementing BCD subtraction. This was one of the Z80 improvements that were considered importan…

Slight correction, the correct offset is 7, and DAA only adds 6. But the trick is also adding the carry bit. This works on the 6502 in decimal mode too, e.g. https://news.ycombinator.com/item?id=6342286 On the Z80 and 8086, the code can be made one byte shorter by taking advantage of adjust-after-subtraction, which the 8080 didn't have (and on 6502 worked differently): CP 10 / CMP AL,10 ;set carry if valid decimal di…

That. I blatantly "stole" those from Z80 since they are elegant and effective. I have BF (flag) that gets set in ALU when the result is > 9, then DAA/DAS that add 6 or 10 (the latter wraps around as -6 since registers are 4-bit wide).

     12'b0000_0000_001?: begin : instr_daas    // DAA, DAS
       if (flags[BF_BIT])
         rx[0] 

Re: Show HN: A nibble-oriented CPU in Verilog to build a scientific calculator

#46
post #9

If the CPU is nibble-oriented, wouldn't that mean that that is its byte size?

Are you trying to make a pun with byte/bite relating to nibble? Because that's actually where the term nibble (referring to 4 bits) comes from, so I'm not sure such a pun even counts as a pun anymore. Or am I misinterpreting your comment?

I was not making a pun, though the terms of art in that area were clearly made to be puns. I was pointing out that the byte-size of a CPU is typically defined as its smallest addressable unit, so, I was confused to see a CPU using an architecture that works with half of that size; it does not make sense to me.
Post reply on HN