Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

When we write programs that "learn", it turns out we do and they don't.


programming / alt.lang.asm / Boolean/logic gate operations/sec.

SubjectAuthor
o Boolean/logic gate operations/sec.skybuck2000

1
Subject: Boolean/logic gate operations/sec.
From: skybuck2000
Newsgroups: alt.lang.asm
Date: Sat, 18 Dec 2021 18:12 UTC
X-Received: by 2002:a05:622a:3cb:: with SMTP id k11mr7081400qtx.381.1639851177338;
Sat, 18 Dec 2021 10:12:57 -0800 (PST)
X-Received: by 2002:a9d:1ca9:: with SMTP id l41mr6226187ota.341.1639851177054;
Sat, 18 Dec 2021 10:12:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Sat, 18 Dec 2021 10:12:56 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=84.25.28.171; posting-account=np6u_wkAAADxbE7UBGUIOm-csir6aX02
NNTP-Posting-Host: 84.25.28.171
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0ae4ed63-d58d-47f0-bd59-0effd86897cfn@googlegroups.com>
Subject: Boolean/logic gate operations/sec.
From: skybuck2...@hotmail.com (skybuck2000)
Injection-Date: Sat, 18 Dec 2021 18:12:57 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 54
View all headers
Here is a nice boolean/logic gate operation/sec challenge for you.

Your mission/the goal is to execute as many boolean/logic gate operations/sec as you possible can/your cpu can/or perhaps even your gpu.

The logic gates to be simulated are the main 6 ones:

and, or, xor, nand, nor, nxor.

Also any explanation as to way that performance is achieved would be appreciated.

For now my guess is that performance will be limited by:

1. Gigahertz
2. Number of cores.
3. Instructions per clock/ALUs/Hyper Threading.
4. Level 1, Level 2, Level 3 Caches.
5. Data/bandwidth rate to chip/cpu/gpu.

For now the assumption is that 1-bit boolean outcomes and thus also 2 bit inputs are what is needed.

So your gate code should look like:

2x 1-bit-input followed by a 1x 1-bit-output.

Gate execution pseudo code:

// load A from A index

// load B from B index

// execute gate: A, B, Operation, C

// save/store C to C index

^ This code is basic and assumes 1 bit registers, in reality processors have multi bit registers, 8 bits, 16 bits, 32 bits, 64 bits, 128 bits, 256 bits and even 512 bits.

However the ALUs hooked up to them could be different, also other operators like ADD, MUL, DIV, SHL, SHR could be used to construct additional boolean logic/gate paths ?! Simulating the and, or, xor ???

I would also be interested in discussing your views on this and any predictions to which hardware will execute it the fastest ?!? Multi-core cpus ?! Or many core GPUS ?!?

Bye for now,
  Skybuck.















1
rocksolid light 0.7.2
clearneti2ptor