Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Standard notation needed for binary numbers as exponents

  1. May 13, 2016 #1
    I work a lot in binary. I am organizing some of my work and need a way to write expressions. I can always create my own notation, but i would rather not invent something that already exists.
    1011 is binary for 11 base 10. I use this {3,1,0} to represent the binary with just exponents. When I multiply this is the notation I use: {3,1,0}(1) ={4,2,1} This is ok , but division is awkward, {4,2,1}/(1) = {3,1,0} Any help will be appreciated.
     
  2. jcsd
  3. May 13, 2016 #2

    jedishrfu

    Staff: Mentor

  4. May 13, 2016 #3
    Actually, I was looking for a better way to show the operation of multiplication and division. I didn't make that clear
     
  5. May 13, 2016 #4

    jedishrfu

    Staff: Mentor

    whats wrong with using the arithmetic operators and hex notation?

    0xA * 0xB = 10 * 11 = 110 = 0x6E
     
  6. May 13, 2016 #5

    jedishrfu

    Staff: Mentor

    do you also have a problem when you multiply with a non power of two number

    (3,1,0) * (3,1,0) = (3,1,0) * 3 + (3,1,0) * 1 + (3,1,0) * 0 = (6,4,3) + (4,2,1) + (3,1,0) = (6,4,3,2,1,0) ?

    It seems like I'm trying to do things in Roman numerals with this notation so I'm sure folks are going to get real confused.

    This is just my thought though you should still explore its pros and cons.
     
  7. May 14, 2016 #6

    Mark44

    Staff: Mentor

    What's wrong with 1011 for a (four-bit) binary number? That notation is very widely used, and conveys exactly the same information as your {3, 1, 0} notation. Both forms of notation represent ##1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0##. The former notation writes the coefficients, and keeps track of the exponents by the position in the bitstring. Your notation keeps track of the exponents of the terms with nonzero coefficients.
     
  8. May 14, 2016 #7

    Mark44

    Staff: Mentor

    Using bitstrings (as in the usual notation for binary numbers) multiplication is performed analogously with how it is performed in decimal arithmetic when multidigit numbers are multiplied. The only facts that are needed though, are 0 * 0 = 0, 0 * 1 = 1, 1 * 0 = 0, and 1 * 1 = 1. Division also works analogously with how it is performed with decimal numbers.
     
  9. May 14, 2016 #8
    Time to end this thread. I am not interested in binary vs other bases,etc. I wanted to know if there existed notation analgous to set theory for strictly dealing with operations on exponents. I chose binary as there are no coefficients. This makes operating with numbers, quicker and more straight forward. I am also working with very large integers, thousands to millions of bits. On average eliminating the zero bits cuts the work in half.
     
  10. May 14, 2016 #9

    jedishrfu

    Staff: Mentor

    What if in your notation you used a -1 for the division?

    What kind of work are you doing that requires arithmetic operations on very large binary numbers?
     
  11. May 15, 2016 #10
    I'm programming a PowerMod function and factoring large numbers. PowerMod requires squaring of numbers. Squaring is a "pig" operation with large numbers in a computer. The key is to make the operation as quick as possible. The notation question arises because to explain my squaring method I needed something to demonstrate the method in a paper. It is easy to program without notation, I was just wondering if such notation already existed. I can always continue using my own.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Standard notation needed for binary numbers as exponents
  1. Number of rolls needed (Replies: 1)

Loading...