Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 2385

8-bit acorn hardware • Re: Setting a real-time clock to centi-second accuracy

$
0
0
Ah, yes, 13 (four byte) additions, that's quite neat. Additions of the shifted value, so that's where you'd need the carry. Note that you can either shift the value each time, or shift the accumulated total each time.

Also note, Booth encoding might help a bit. I've probably got a mistake in the following, but...
42949673 = 0x28F5C29
so the 2 and 8 are additions, then with the run of 4 one bits you can do with one more addition and a subtraction, and so on:

Code:

0x28F5C29 =    binary 0010 1000 1111 0101 1100 0010 1001positive bits: binary 0010 1001 0000 0110 0000 0010 1001 (8 additions)negative bits: binary 0000 0000 0001 0000 0100 0000 0000 (2 subtractions)

Statistics: Posted by BigEd — Sun Mar 10, 2024 8:38 am



Viewing all articles
Browse latest Browse all 2385

Trending Articles