C++ Logo


Advanced search

Re: Setting wording for bit manipulation for non-binary hardware

From: Vishal Oza <vickoza_at_[hidden]>
Date: Sat, 6 Mar 2021 17:57:27 -0600
The base of this idea is to add an undefined behavior clause if one writes
C++ using bit manipulation in a target machine that does not use binary
arithmetic in its arithmetic model. The bits value would represent a digit
in the numbering system or a q-bit if the system is a quantum computing
system. The best example I can think of is to have an arithmetic unit that
has base 10 as its numbering system. We still have types like int, long,
short, long long, unsigned int, unsigned long, unsigned short, unsigned
long long, float and double as well as value defined in cstdint but the
uint8_t would have value that range from 0 to 99999999 while on normal
hardware it would range from 0 to 255. endian would be useful regardless of
base as it would describe how the processor deals with multi-length words.
I am not sure if bit-shifting should be defined or not but if it is then
the bit shift sure work with the hardware base and not assume base-2.

On Sat, Mar 6, 2021 at 4:00 PM Thiago Macieira via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> On Saturday, 6 March 2021 11:34:36 PST Jason McKesson via Std-Discussion
> wrote:
> > This is the wrong mailing list for "should this be a proposal" type
> > things. You're looking for the "std-proposals" list.
> >
> > That being said, considering what I said above, you need an
> > explanation for why hardware that is base 6 can't implement the
> > standard as is.
> In other words, you may want to make the hardware first, which will lead
> you
> to think about how much existing software you want to run on it and how
> much
> to leave out.
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DPG Cloud Engineering
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

Received on 2021-03-06 17:58:25