flat assembler
Message board for the users of flat assembler.

Index > Main > Base 4 numbers

Author
Thread Post new topic Reply to topic
Eoin



Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin
I've a suggestion for Fasm. I think the addition of Base 4 numbers would greatly improve the readability of shuffle instructions.

eg this can be confusing
Code:
shufps xmm0,xmm0,11010010b    

but this makes much more sense
Code:
shufps xmm0,xmm0,3102    

I don't know what identifer shoud be used, maybe "q" for quad?


Last edited by Eoin on 15 Aug 2003, 19:23; edited 1 time in total
Post 15 Aug 2003, 19:11
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
looks understandable to me, just as undestandable as the binary. But the quadrary is perhaps easier for some.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 15 Aug 2003, 23:11
View user's profile Send private message Visit poster's website Reply with quote
Eoin



Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin
Maybe its just me, but in the shuffle instruction pair of binary digits means something, not the number as a whole.

So if you want to quickly see whats being shuffled into say the second slot you first have to look carefully to see which two binary digits refeer to that slot, then translate them. Base 4 numbers allow you to pick out the one important digit very quickly.

Yeah its not very important, but it would be nice.
Post 16 Aug 2003, 00:17
View user's profile Send private message Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv
That's a really weird request I must say. Very Happy
Post 16 Aug 2003, 08:52
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
Eoin



Joined: 16 Jun 2003
Posts: 68
Location: Ireland
Eoin
I know I know, maybe look at it this way, we have number types for

2^1 Binary
2^2 ?
2^3 Octal
2^4 Hexadecimal

Theres a gap there that needs filling Confused nah on second thought my origional posts make more sense Laughing .
Post 16 Aug 2003, 11:36
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
Eoin wrote:
2^1 Binary
2^2 ?
2^3 Octal
2^4 Hexadecimal

? = quadral, quadrinary, quattrinary, qtal, quadtal, q(u)nary, butanary. - which foolws the patter the best?

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 16 Aug 2003, 11:47
View user's profile Send private message Visit poster's website Reply with quote
eet_1024



Joined: 22 Jul 2003
Posts: 59
eet_1024
tetral?
Post 19 Aug 2003, 09:15
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
tetral - good one too. Smile

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 19 Aug 2003, 11:04
View user's profile Send private message Visit poster's website Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1137
Location: Russian Federation
comrade
Quadratic?

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 20 Aug 2003, 00:53
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
(Unary), Binary, Triary, Quadrary, Pentary, Hexary, Septary, Octal, Nonal, Decal(Decimal), Unadecimal, Bidecimal, Tridecimal, Quattrodecimal, Pentadecimal, Hexadecimal, Septadecimal, Octadecimal, Nonadecimal, Dekadecimal, 21, 22, 23, you get the poind Razz
Post 10 Aug 2004, 12:22
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
okay, "q", but who would use it anyway? Why should we fill FASM with things almost never used that can be as well achieved another way. Why are two binary digits less readable than one "quadrary"?
(same opinion about octal numbers)
Post 10 Aug 2004, 18:12
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc
Quote:
(same opinion about octal numbers)


Octal is VERY useful for some things... like assemblers. Most of the x86 opcodes can be organized via opcode easily in octal, but not as much so in hex or decimal.
Post 10 Aug 2004, 19:12
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
I've gotten used to it Smile
and PLEASE, stop converting hex to dec in your mind or on your computer
think as if you have never heard of base 10 system and you'll get used to
it - like your mother language or a base 10 system. Let it go, you don't
need q or o or even dec in assembly Very Happy
Post 10 Aug 2004, 19:31
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc
Quote:
think as if you have never heard of base 10 system and you'll get used to it - like your mother language or a base 10 system. Let it go, you don't need q or o or even dec in assembly


Hmm, I like decimal, though I also use hex, octal, binary, and other exotic bases (Base 60 is good when dealing with large numbers...). There's no reason NOT to use the base you're most comfortable with, if it's supported by the tool.
Post 10 Aug 2004, 20:13
View user's profile Send private message Visit poster's website Reply with quote
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
Imagist
The computer interprets numbers of all bases into binary, so I don't see how it matters.
Post 10 Aug 2004, 20:19
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
I have a story: Smile
My English teacher always persuaded us to 'think' in English. I wondered
what she ment by that 'til I suddenly started doing that one day. Nothing
seemed to need translating any more. Few monts ago I started thinking
in HEX and BIN so I don't need to go throuhg any DEC to compare them to
'real' values - I just accept it. It's not hard if you once get the point Wink

...and now, children - it's bedtime. The digits lived happily ever-after.

=>00:04 is really a good time to go to bed, because it's Q Very Happy
Post 10 Aug 2004, 21:00
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld
Eoin wrote:
I've a suggestion for Fasm. I think the addition of Base 4 numbers would greatly improve the readability of shuffle instructions.

eg this can be confusing
Code:
shufps xmm0,xmm0,11010010b    

but this makes much more sense
Code:
shufps xmm0,xmm0,3102    

I don't know what identifer shoud be used, maybe "q" for quad?

I think it's so useless as writing 248004015204 (in base 256) and expecting the compiler to translate it to 0xF8040FCC.
Post 11 Aug 2004, 05:51
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
You did something wrong because 248004015204base256 is
623843501854137515595923460DEC and its
20408000004000105020004HEX
I don't get it, what did you mean with that?
Post 11 Aug 2004, 06:16
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.