Shop OBEX P1 Docs P2 Docs Learn Events
Quatenary numbers — Parallax Forums

Quatenary numbers

NewzedNewzed Posts: 2,503
edited 2006-12-16 06:39 in General Discussion
Can someone please explain this to me:

%%3311_2301_1012
What does it mean?· How can I translate it to dec, hex or binary?
Sid

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Don't have VGA?

Newzed@aol.com
·

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-12-15 15:14
    Where is it used?

    · If it is a quatenery number ( ie, a base 4 number) each digit would be represented by 2 binary digits.( to give the values of 0 to 3).· Extending my assumption further, each of your groups of 4 digits would become an 8-bit binary number.

    More information increases the chances of getting a useful answer.

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com


    Post Edited (stamptrol) : 12/15/2006 3:29:41 PM GMT
  • NewzedNewzed Posts: 2,503
    edited 2006-12-15 15:24
    It doesn't matter where it is used - it's a mathematical expression.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Don't have VGA?

    Newzed@aol.com
    ·
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-12-15 15:55
    yes, it matters.

    The only reason we have to think it's a 'quatenery'(forst time I've seen that name for it) number is the topic for this thread.
    Seeing how or where it's used can help us confirm or disprove that.

    but...
    If it really IS base 4...
    then two digits will make up one HEX digit. Multiply the higest digit with 4, add the lower digit and transform.

    3311 =
    (3x4 + 3) (1x4+1) =
    (15)(5) =
    F5

    for binary, every digit needs to be expanded to two digits.

    0 = 00
    1 = 01
    2 = 10
    3 = 11

    3311 = 11110101

    The '_' symbols are there just to make it easier to read.

    Decimal?
    Just remember that each digit needs to be multiplied with the value of its position.

    3311_2301_1012
                           1
                         4
                       16
                      64
                  256
                1024
              4096
            16384
    and so on...
    
    


    Or just use the scientific mode of a calculator to convert between HEC and DEC...
    smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-12-15 23:00
    It really is base 4, it's used in the Propeller for 2 bit coloring information. Easiest is coverting each number into it's equivalent 2 number binary value and converting to other bases from there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-12-16 06:39
    Paul, thanks for providing such a useful context. I wasn't yet aware that Propeller Video was using Base 4 to present variables. If fact, I had imagined that anything other that Hexidecimal, Binary, and Decimal were pretty much obsolete notations.

    Incidentally, I have such challenges to meaning all the time. My language students will throw a list of words at me and ask me to define and compare all of them. But meaning is always related to context as polysemy is quite common.

    In this case, a string of numbers is so abstact.
    I presume the 'CLUE' IS THE DOUBLE PERCENTAGE or %% [noparse][[/noparse]Binary x Binary]·or Base4.

    All becomes clear from that indicator.

    I will jump back into my Hydra text to see if that provides more insight.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 12/17/2006 8:00:06 AM GMT
Sign In or Register to comment.