Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. i just realized id love to have a signed 1 bit type actually.

i just realized id love to have a signed 1 bit type actually.

Scheduled Pinned Locked Moved Uncategorized
29 Posts 7 Posters 95 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M mothcompute@merping.synth.download

    i just realized id love to have a signed 1 bit type actually. something whose only values are 0 or -1 is actually very useful as a factor, and very easy to translate to the values 1 and -1, an even more useful factor

    sudo200@layer8.spaceS This user is from outside of this forum
    sudo200@layer8.spaceS This user is from outside of this forum
    sudo200@layer8.space
    wrote last edited by
    #2

    @mothcompute

    Evil boolean.

    1 Reply Last reply
    0
    • M mothcompute@merping.synth.download

      i just realized id love to have a signed 1 bit type actually. something whose only values are 0 or -1 is actually very useful as a factor, and very easy to translate to the values 1 and -1, an even more useful factor

      M This user is from outside of this forum
      M This user is from outside of this forum
      mothcompute@merping.synth.download
      wrote last edited by
      #3

      0 or -1 would be a great factor for creating kernel side linux syscall return values which are often either 0 or the additive inverse of an errno. coercing a bool to 1 or -1 is seemingly useful enough that i keep having to do it but i cant remember any specific place i use it

      M 1 Reply Last reply
      0
      • M mothcompute@merping.synth.download

        0 or -1 would be a great factor for creating kernel side linux syscall return values which are often either 0 or the additive inverse of an errno. coercing a bool to 1 or -1 is seemingly useful enough that i keep having to do it but i cant remember any specific place i use it

        M This user is from outside of this forum
        M This user is from outside of this forum
        mothcompute@merping.synth.download
        wrote last edited by
        #4

        'multiply sign extended bool bitwise-and constant with value and conditional branch on result' is an instruction i keep wishing i had

        sudo200@layer8.spaceS M 2 Replies Last reply
        0
        • M mothcompute@merping.synth.download

          'multiply sign extended bool bitwise-and constant with value and conditional branch on result' is an instruction i keep wishing i had

          sudo200@layer8.spaceS This user is from outside of this forum
          sudo200@layer8.spaceS This user is from outside of this forum
          sudo200@layer8.space
          wrote last edited by
          #5

          @mothcompute That was my nickname in college /jk

          1 Reply Last reply
          0
          • M mothcompute@merping.synth.download

            i just realized id love to have a signed 1 bit type actually. something whose only values are 0 or -1 is actually very useful as a factor, and very easy to translate to the values 1 and -1, an even more useful factor

            domi@donotsta.reD This user is from outside of this forum
            domi@donotsta.reD This user is from outside of this forum
            domi@donotsta.re
            wrote last edited by
            #6

            @mothcompute@merping.synth.download the logical conclusion of IEE754 is 2-bit "float": representing -1, 1, 0 or NaN

            lilahexe@fedi.lilahexe.topL 1 Reply Last reply
            0
            • M mothcompute@merping.synth.download

              'multiply sign extended bool bitwise-and constant with value and conditional branch on result' is an instruction i keep wishing i had

              M This user is from outside of this forum
              M This user is from outside of this forum
              mothcompute@merping.synth.download
              wrote last edited by
              #7

              honestly i might try implementing this on zen 2 if i can find an appropriate instruction to override

              chfour@merping.synth.downloadC sudo200@layer8.spaceS 2 Replies Last reply
              0
              • M mothcompute@merping.synth.download

                honestly i might try implementing this on zen 2 if i can find an appropriate instruction to override

                chfour@merping.synth.downloadC This user is from outside of this forum
                chfour@merping.synth.downloadC This user is from outside of this forum
                chfour@merping.synth.download
                wrote last edited by
                #8

                @mothcompute like in microcode?

                M 1 Reply Last reply
                0
                • chfour@merping.synth.downloadC chfour@merping.synth.download

                  @mothcompute like in microcode?

                  M This user is from outside of this forum
                  M This user is from outside of this forum
                  mothcompute@merping.synth.download
                  wrote last edited by
                  #9

                  @chfour yes itll be awesome

                  sudo200@layer8.spaceS chfour@merping.synth.downloadC domi@donotsta.reD 3 Replies Last reply
                  0
                  • M mothcompute@merping.synth.download

                    @chfour yes itll be awesome

                    sudo200@layer8.spaceS This user is from outside of this forum
                    sudo200@layer8.spaceS This user is from outside of this forum
                    sudo200@layer8.space
                    wrote last edited by
                    #10

                    @mothcompute @chfour

                    I would really like to know how your ideal ISA would look like.

                    M 1 Reply Last reply
                    0
                    • M mothcompute@merping.synth.download

                      @chfour yes itll be awesome

                      chfour@merping.synth.downloadC This user is from outside of this forum
                      chfour@merping.synth.downloadC This user is from outside of this forum
                      chfour@merping.synth.download
                      wrote last edited by
                      #11

                      @mothcompute thats cool

                      1 Reply Last reply
                      0
                      • M mothcompute@merping.synth.download

                        honestly i might try implementing this on zen 2 if i can find an appropriate instruction to override

                        sudo200@layer8.spaceS This user is from outside of this forum
                        sudo200@layer8.spaceS This user is from outside of this forum
                        sudo200@layer8.space
                        wrote last edited by
                        #12

                        @mothcompute

                        Yeah, just casually writing your own microcode.

                        I feel inadequate to be around you now tbh.

                        M 1 Reply Last reply
                        0
                        • sudo200@layer8.spaceS sudo200@layer8.space

                          @mothcompute @chfour

                          I would really like to know how your ideal ISA would look like.

                          M This user is from outside of this forum
                          M This user is from outside of this forum
                          mothcompute@merping.synth.download
                          wrote last edited by
                          #13

                          @sudo200 @chfour generally speaking i believe in cisc design principles, so without a doubt variable length, lots of orthogonality, and a lot of compound instructions. but unlike x86 the instruction stream would be self synchronizing, which makes it much easier to decode instructions and fetch and sequence microoperations ahead of execution

                          sudo200@layer8.spaceS M 2 Replies Last reply
                          0
                          • M mothcompute@merping.synth.download

                            @sudo200 @chfour generally speaking i believe in cisc design principles, so without a doubt variable length, lots of orthogonality, and a lot of compound instructions. but unlike x86 the instruction stream would be self synchronizing, which makes it much easier to decode instructions and fetch and sequence microoperations ahead of execution

                            sudo200@layer8.spaceS This user is from outside of this forum
                            sudo200@layer8.spaceS This user is from outside of this forum
                            sudo200@layer8.space
                            wrote last edited by
                            #14

                            @mothcompute @chfour

                            Interesting. I have a MISC ISA spec (if you can call it that) laying about somewhere, which is basically the exact opposite

                            sudo200@layer8.spaceS 1 Reply Last reply
                            0
                            • M mothcompute@merping.synth.download

                              @sudo200 @chfour generally speaking i believe in cisc design principles, so without a doubt variable length, lots of orthogonality, and a lot of compound instructions. but unlike x86 the instruction stream would be self synchronizing, which makes it much easier to decode instructions and fetch and sequence microoperations ahead of execution

                              M This user is from outside of this forum
                              M This user is from outside of this forum
                              mothcompute@merping.synth.download
                              wrote last edited by
                              #15

                              @sudo200 @chfour cpus have done predecode for decades now but i think with higher level source machine code and self synchronization that lets you get away with much more intelligent and of course much more parallel reordering, and in ideal cases the ability to do the entire decode step for an instruction page ahead of execution, whereupon you can simply copy them verbatim into the pipeline without actually decoding anything in realtime. the catch is it uses a whole lot of power and die space

                              M 1 Reply Last reply
                              0
                              • M mothcompute@merping.synth.download

                                @sudo200 @chfour cpus have done predecode for decades now but i think with higher level source machine code and self synchronization that lets you get away with much more intelligent and of course much more parallel reordering, and in ideal cases the ability to do the entire decode step for an instruction page ahead of execution, whereupon you can simply copy them verbatim into the pipeline without actually decoding anything in realtime. the catch is it uses a whole lot of power and die space

                                M This user is from outside of this forum
                                M This user is from outside of this forum
                                mothcompute@merping.synth.download
                                wrote last edited by
                                #16

                                @sudo200 @chfour i think in many respects cisc machine code is simply ir, so the more symbolic and less literal it is the better chance you get at runtime to optimize it for the underlying silicon, which is really all compilers do

                                1 Reply Last reply
                                0
                                • sudo200@layer8.spaceS sudo200@layer8.space

                                  @mothcompute @chfour

                                  Interesting. I have a MISC ISA spec (if you can call it that) laying about somewhere, which is basically the exact opposite

                                  sudo200@layer8.spaceS This user is from outside of this forum
                                  sudo200@layer8.spaceS This user is from outside of this forum
                                  sudo200@layer8.space
                                  wrote last edited by
                                  #17

                                  @mothcompute @chfour

                                  I mean, it is literally designed to be as absolutely minimal and simple as possible, but still

                                  1 Reply Last reply
                                  0
                                  • sudo200@layer8.spaceS sudo200@layer8.space

                                    @mothcompute

                                    Yeah, just casually writing your own microcode.

                                    I feel inadequate to be around you now tbh.

                                    M This user is from outside of this forum
                                    M This user is from outside of this forum
                                    mothcompute@merping.synth.download
                                    wrote last edited by
                                    #18

                                    @sudo200 honestly i learned everything i know about amd microcode out of two pdfs and five markdown files; im not sure its that far out of reach if youre interested in learning it

                                    sudo200@layer8.spaceS 1 Reply Last reply
                                    0
                                    • domi@donotsta.reD domi@donotsta.re

                                      @mothcompute@merping.synth.download the logical conclusion of IEE754 is 2-bit "float": representing -1, 1, 0 or NaN

                                      lilahexe@fedi.lilahexe.topL This user is from outside of this forum
                                      lilahexe@fedi.lilahexe.topL This user is from outside of this forum
                                      lilahexe@fedi.lilahexe.top
                                      wrote last edited by
                                      #19

                                      @domi @mothcompute this reminds me of the boolean with three states I saw in a production codebase: true, false and undefined

                                      M 1 Reply Last reply
                                      0
                                      • lilahexe@fedi.lilahexe.topL lilahexe@fedi.lilahexe.top

                                        @domi @mothcompute this reminds me of the boolean with three states I saw in a production codebase: true, false and undefined

                                        M This user is from outside of this forum
                                        M This user is from outside of this forum
                                        mothcompute@merping.synth.download
                                        wrote last edited by
                                        #20

                                        @LilaHexe @domi ive seen stuff like that before and i always wonder if theyve just never heard of ternary logic or something

                                        1 Reply Last reply
                                        0
                                        • M mothcompute@merping.synth.download

                                          @chfour yes itll be awesome

                                          domi@donotsta.reD This user is from outside of this forum
                                          domi@donotsta.reD This user is from outside of this forum
                                          domi@donotsta.re
                                          wrote last edited by
                                          #21

                                          @mothcompute@merping.synth.download @chfour@merping.synth.download this reminds me. my main pc is a 3700X now. and i have a spare 3600 after an upgrade

                                          ... you know. maybe i really should look into it. I wonder how much shenanigans could I get away with

                                          M 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups