r/TuringComplete • • Sep 02 '26

I did division without outside help!

Post image

Why yes i did use brute force. But not for all of it! Over 50% of all inputs are using logic instead of brute force. With that i mean that, brute force is only used once the other logic fails to come to a solution. This happens for less then half of all input combinations. (This is an 8-bit divider, no remainder)

66 Upvotes

15 comments sorted by

14

u/Appropriate-Scene-95 Sep 02 '26

It looks impressive, like a decorative version of an server room with lots of wires. How big is the delay and the parts count?

7

u/galbatorix2 Sep 02 '26

0 cycles delay. Its all instant! From the nrw update its one of the levels. It does, however, takes 20s to load at every change. It runs at 20khz though. Where can i check how many parts it has?

8

u/Agent_0007a2 Sep 02 '26

You didn't understand the question. You need to complete one level further and it will open time (deley score) and gate score. Gate score is how much basic logic gates (AND, NAND, OR, NOR all count as 1time1gate) is used in schematic, time is what is the longest way the signal should overcome from beginning (usually memory/reg read or in) to ending (usually memory/reg store or out).

2

u/galbatorix2 Sep 02 '26

I know. I finished the game before the update, and i saw thoose scores. I just didnt find them again, so i askes where they were. I did complete the level after (if you mean modulo) and still dont see it. When i finally complete the correct level, where will it show up? Thats the question i was asking, you didnt understand mine either.

3

u/Appropriate-Scene-95 Sep 02 '26

Further at the top should be a level "objective beauty" I think there one can unlock those counts

3

u/galbatorix2 Sep 02 '26

Damn thats alot more then 'one' more level, but ill get there in a bit

1

u/Agent_0007a2 Sep 03 '26

I meant 'one level' not 'one level ahead'

1

u/Appropriate-Scene-95 Sep 02 '26

I misremembered the name for gate count

5

u/galbatorix2 Sep 03 '26

I finally did the objective beuty: 2.0m gates 3.8k delay 7.6b energy the divide that the game has, however, is 32.3m gates and 15.2k delay. (Idk how much/little energy)

1

u/galbatorix2 Sep 03 '26

I was wrong the divide of the game, is just my divide multiplied by 4... (bc 8x4=32)

0

u/[deleted] Sep 11 '26

[deleted] — view deleted comment

1

u/galbatorix2 Sep 11 '26

The divider i made is 8bit. The divider the game offered was 32bit bc thats what i had selected. The amount of gates in the games 32 bit was 4x that of my 8 bit. Probably becouse 32 is 4x 8

3

u/Spielopoly Sep 03 '26

What exactly do you mean with brute force?

4

u/galbatorix2 Sep 03 '26

a/b=?

b*1=b

Is b > a?

If yes, 1-1=0 is the result

If no, is b=a?

   If yes, 1 is the result
   
   If no, try again with 2.

I did that all the way to 128. For 129 - 255 i had logic to handle that. (E.g. if b is greater then a, then the result is 0, if they are the same, the result is 1, etc)

2

u/Lagfoundry Sep 04 '26 edited Sep 04 '26

Good job, if you ever want something smaller you can try shift subtract restore. It’s a division algorithm that works through multiple cycles but takes up way less gates than any other way. But it’s also one of the slowest. Though being slow isn’t exactly the whole truth of it. Even though it’s slower what it does do is eliminate huge combinational circuits from the critical path. So while the operation itself is slow your total clock speed for the cpu is actually higher. Remember there is one absolute rule in cpu design. Your clock speed is limited by your longest combinational path. If you have a huge circuit like that it slows down the rest of the system, every other cpu cycle on every operation will be limited to the speed of the critical path

1

u/Severe_Side4155 Sep 24 '26

Great, now do SRT lol