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

Investigation of binary numbers

  1. Sep 5, 2012 #1
    Hi :-)
    I have questions regarding the binary properties of numbers.
    I would like to discuss some very specific attributes of "scalar" values.

    IF the goal is to compile a pattern recognition algorithm instead of training it with test sets,
    Then I am investigating a method for the compilation of neural nets/matrices and attempting induction instead of deduction as in "Curve Fitting".

    This attempt has introduced speculation that requires more information outside of the box "standard mathematics" in order to determine the validity of this direction of research.

    To dicuss this, i need the proper forum and the proper individual(s) that can step outside of the box. Please point me where I can learn how to articulate the following in order to be able to ask the right questions.
    Inside of the box that is standard mathematics a scalar has magnitude and no direction.
    x=100 in decimal or 1010 in binary is a count when using the base 10 algorithm and iterating from rightmost digit to leftmost digit.
    effectively counting.

    Outside of the box every scallar has direction when reversing the direction of the counting algorithm and using a measuring algorithm starting from left most digit to rightmost. in other words, the result when treating the scalar as a measure instead of a count, results in a "path" or measurement (not a count as in the previous example.)
    1010 from left to right indicates the 1st half of the 2ndhalf of the 1sthalf of the 2ndhalf.

    This behaviour facinates me.

    has anyone any books, papers, or references on this strange topic in relation to curve fitting? A name, anything?
    Last edited: Sep 5, 2012
  2. jcsd
  3. Sep 5, 2012 #2


    Staff: Mentor

    Some scalars (such as real numbers) can be considered to have a direction, if you consider negative vs. positive scalars. Integers are used to count things, but rationals and real numbers are used for measurements.
    Could you elaborate on what you're doing here? How do you get "1st half of the 2nd half of the 1st half of the 2nd half" out of 1010?

    If I'm following what you're saying, you aren't working with the properties of numbers - you are just encoding something in a string of numeric digits.
  4. Sep 6, 2012 #3


    User Avatar
    Science Advisor

    I really have no clue what you are talking about. If you are going to work "outside" the standard "box", you will have to define, very carefully, exactly what you mean by "measurement", "direction of a scalar" and other words that you are not using in the standard way.
  5. Sep 6, 2012 #4
    My apologies Halls of Ivy... you are correct, and i am ... a little sloppy. ;-) thanks. I'll do better. When you correct, I shall implement to the best of my ability.

    Dead on Mark... except for the encoding statement. Encoding implies action. i took no action but on an existing property.
    for the sake of argument let us suppose the proposition the subject is a property be true.

    Then, Encoding takes advantage of this property i am attemting to isolate for observation. (After this, i can begin to use the scientific method)

    The path is from discreet math and is something I found when experimenting with Morton Location Codes, compression, and hashing algorithms.
    In this example, I am using the same principle, but with only one dimension and trying to keep it simple (no interleaving).

    Counting: in binary, the decimal number 10 is represented as 1010 (lower limit = 0000 upper limit = 1111)
    The set A is the set of all integers from lower limit 0 to upper limit 15(1111) or A = {a:a = 0..15}
    Then, the 10th element is 9.

    Measuring: in binary, the decimal number 10 is represented as 1010. Consider this a binary path into a binary space when using the divide and conquer algorithm.(less t, only 5 steps instead of the 10 required when counting or iterating)

    Let a = 10-1 or 9 (binary 1001) (you have to subtract one because you are measuring and not counting.)

    The set D is the set of all digits in the path we wish to consider or D = {d:d= 1,0,0,1}

    Let set B = upper or lower half of set A or B={b:b = 0,1,2,3,4,5,6,7 OR 8,9,10,11,12,13,14,15} depending on the value of the current digit.

    Consider d[0] of 1010 = 1. if d[x]=0, use lower half of set B, when d[x]=1 use upper half of Set B. cardinality of Set B now 15, will be half after this step.

    Our 1st digit is a 1, Then Let B = {b:b 8,9,10,11,12,13,14,15} and we now have only 8 elements to consider.
    Our 2nd digit is a 0, then Let B={b:b 8,9,10,11}
    Our 3rd digit is a 0, then Let B = {b:b 8,9}
    Our 4th digit is a 1, then Let B={b:b 9}
    When the cardinality of Set B is reduced to 1 using the divide and conquer algorithm, We have our answer and it is the same as when counting.

    I hope I got close…. This is not easy to describe.
    I want to know more about this if possible. I'm breaking my brain on how training a matrix allows it to recall patterns.... I can't figure out how to reverse the process and compile a matrix. it should have been simple function composition but... sigh. lost again.

    CLARIFICATION: if U is a vector space using the counting coordinate system and V is a vector space using the measuring system, then the operator I am looking for maps U to V. (it almost sounds right... need help... over my head ;-)
    Last edited: Sep 6, 2012
  6. Sep 7, 2012 #5
    Consider d[0] of 1010 = 1. if d[x]=0, use lower half of set B, when d[x]=1 use upper half of Set B. cardinality of Set B now 15, will be half after this step.
    To: Consider d[0] of 1001 = 1. if d[x]=0, use lower half of set B, when d[x]=1 use upper half of Set B. cardinality of Set B now 15, will be half after this step.
  7. Sep 7, 2012 #6


    User Avatar
    2017 Award

    Staff: Mentor

    I do not see anything new, "outside the box" or whatever here.

    In a similar way, you can consider 0.10012 = 1/2 + 0/4 + 0/8 + 1/16 = 9/16 where the subscript 2 denotes a binary number and the other parts are decimal.
  8. Sep 7, 2012 #7
    Yes sir...it is not out of the box, more appropriately worded as.... "over my head"

    MFB!!!! Sir, what reference can I find on the expression you just used... it has that DARN harmonic series flavor... again.
    That is SWEET!!!! but it sucks as well, because it hints that wherever you point me, is going to put me back in imaginary space dealing with complex numbers and banging my head against Rieman Hypotheses.

    I have to learn to articulate this base proposition or whatever it is before I can present the argument.

    I would like to have an area of study, or a reference that would give me the starting point I need to choose the right forum to continue my line of questioning and research.
    I need education before I can continue. just so that I can find the right words to communicate with you.

    I'm asking here for that... direction.

    Once I know the name, I can google pappers or text books that can continue my education.

    I can't make a speculative statement like:
    "The consequence of mixing counting and measuring algorithms without regard for unit of measure is that the -1 can behave as 1/2 under very specific operations resulting in a deviation similar to that of Li(x) and x/Log(x) from the zeta function"
    because it has no base proposition that I can articulate and you will immediately cease contact.

    I'm having to use a bit of geometry to get there and am having difficulties explaining a geometrical problem in mathematical terms.

    I want to learn, and am unable to continue my education, and am hoping you might donate some of your time to .... show me the way.
    Last edited: Sep 7, 2012
  9. Sep 7, 2012 #8

    Stephen Tashi

    User Avatar
    Science Advisor

    I'll make a guess about what Hermy is asking.

    He wants to know a symbolic expression for a function f(S) whose domain is a string of N binary digits and whose range is a subset of the non-negative integers.

    The function is defined by an algorithm that amounts to interpreting the string as process that cuts out pieces of a vector of numbers until only one number is left. (This is in contrast to the usual way of interpreting a string of binary digits, which amounts to adding up various powers of 2.)

    The algorithm for computing the integer y as a function of the string S is as follows:


    Form a vector of integers V[0] that lists the first 2^N non-negative integers.
    (For example, if N = 4, V[0] = [0,1,2,...,15]

    Set i = 0 and iterate the following steps until the process defines a vector V[i+1] that contains a single integer

    Examine the i+1 digit in the string
    if the digit is 0, form a new vector V[i+1] that consists of the integers listed in the first half of V
    if the digit is 1, form a new vector V[i+1] that consists of the integers listed in the second half of V

    (For example if the ith digit is 0 and V = [0,1,2,...7,8,...15] then V[i+1] = [0,1,2,..,7] )

    if V[i+1] contains only a single integer y, the function returns y.

    Otherwise set V = V[i+1], i = i+1 and repeat the above steps.

  10. Sep 7, 2012 #9
    Yes Sir... "In contrast" as in I just changed the direction of the algorithm. from one that has to ask more questions than the other.

    Almost an inversion... but with a twist I am unable to identify.

    It seems to appear in the strangest spaces. and mostly around the operators -1, 1/2, and the square root of a -1.

    Mr. Tashi, What do I call the expression you used and what topic should I begin studying in order to express myself as you. I'm at the limit of my experience.... sniff... ;-)

    The only patent I've ever seen that took advantage is the "Bus-Switch Encoding" patent I found a few years back.
    takes advantage of the fact that, for example, a 32 bit buss can send 4 channels of 8 bit operands at once.

    by using this path thing, I can sort my operations into a subspace such that all of my 8 bit calculations, 16 bit, and 32 bit calculations can be... non-deterministic... I don't need to ask the question "carry?" as when counting. I just.... navigate to the correct space ... perform the operation encoded in the element there.

    effectivly, the encoding is a lookup into a set of 8,16,and 32 bit ORs without the hidden carry cost associated with most ALUs.

    It should speed up my ALU simulator... but again, having problems describing what I'm doing.

    by placing my simulated objects in an octree.... I can easily use this property to do more adds per frame than most by taking advantage of this property that is built in to the numbers of my x,y,and z members.
    I do not have to ask the question "how small a bit vector is required for the operation"...it's what I couldn't express to the sweng@gamedev guys several years ago...and have been trying to learn how to express ever since.

    I embarassed myself so bad with my barbarian grammar, that I can't go back there until I can explain myself. I HAVE to be able to communicate with people like Mr Crosbie Fitch whom I admire.
    I rely on you for input.
    Last edited: Sep 7, 2012
  11. Sep 7, 2012 #10
    It might be helpful to note that the number of digits in the path is ALWAYS the number of operations required to reduce the set to 1 element.

    Also, ... I intentionaly mapped the example vector spaces so that you could see the relation between counting and measuring that I am researching.

    And,... it appears...until i learn more, that the ratio of energy consumed between the two types of work: counting and measuring, is 1/2.

    WARNING: for your own health and sanity... do not play with a formula to observe the effects of randomly reversing the order of digits. Like to drove me nuts.
    Also... you may not want to consider this in base 8,10, or 16 as it gets really hairy because of the addition of "base", Limit parameters.
    Last edited: Sep 7, 2012
  12. Sep 7, 2012 #11


    Staff: Mentor

    What mfb showed has nothing to do with the harmonic series. It is how floating point numbers that aren't integers can be represented. The representation mfb showed is exactly the same as a decimal fraction, except that the numbers to the right of the "binary point" (not decimal point) are coefficients of (negative) powers of 2. In a decimal fraction, the digits are coefficients of negative powers of 10.

    An example:

    3/8 = .37510 = 3 x 10-1 + 7 x 10-2 + 5 x 10-3

    3/8 = .0112 = 0 x 2-1 + 1 x 2-2 + 1 x 2-3
    Imaginary space?
    Complex numbers?
    Riemann hypothesis?
    It seems to me you are throwing around terms that you don't understand.
  13. Sep 7, 2012 #12

    Stephen Tashi

    User Avatar
    Science Advisor

    I don't know if you are referring to a specific expression. My advice is that you study how to write. In order to write clearly, your language should be precise and it should not use terminology that you yourself have invented unless that terminology is explained. There are a small number of incoherent writers who know what they are doing, but have a particular disability when it comes to writing. A far larger number of incoherent writers can't express themselves clearly because they haven't figured out what they are doing.

    If you are dealing with a problem of designing digital electronic circuits, you should ask about in another section of the forum where the readers are likely to be familiar with NAND gates, multiplexing, etc. You can't assume readers in the mathematics section understand this technology.

    Technical writing should be concise if you expect it to attract readers. It shouldn't have all sorts of side-remarks and personal expressions of emotion. For what you have been able to express, your posts have been unnecessarily long.

    If you need the answer to a mathematical question, you should study mathematics and learn its standard terminology. If you have question about algorithms, you should study computer programming and how algorithms can be represented in pseudo-code.
  14. Sep 7, 2012 #13
    Thank you Mr. Tashi. I have the opposite of dyslexia... an output handicap instead of input. I have to find opportunity to repeatedly train myself in technical writing or i'll never develop the skill. hard to do at 44 with a job and mired in with .... the uneducated.
    verblexia ;-) I have the programming and need to learn the math as well as how to express myself.
    I've read discreet math 3 times, Pattern Recognition and Machine Learning twice, self taught. comprehension without the training leaves me in a bind. I couldn't afford college in the 80s. so i'm trying to get "free aide" from you.
    You give me a book...i'll devour it faster than you can spit... ask me to communicate and ... sigh.

    MFB and Mr Tashi hit the nail on the head... can we just focus on what that is in purely mathematical terms and not my numerous encounters with my gripe at Riemann, rounding, and -1 and my very poor grammar. I desire to learn. I apologize profusely for speculating that this was even related to our inability to proof the hypothesis.

    Yes sir Mr. Mark. I am using the closest words to concepts I do not have the vocabulary for. I'm counting on you to guide me in. Not just throwing, not for pride as I have none.... adjusting fire... heading to a goal with an incomplete plan and not paralized by indecision and pride. knowing, that no battle plan survives contact with the enemy. I can't let myself be stopped worrying about making a gramatical error, social mistake or miswording a concept I have no words for... I must learn and change. or fail.

    It's faster to learn on my own when I can rely on synergy... aide from others.
    sometimes friction, but still faster than repeated training. divide and conquer!!! my favorite algorithm.

    Mark, the sum of the increasing power of two series or whatever it is... what is it if not harmonic? it was in MFBs denominators AND it's in the zeta function. HECK, middle C vibrates at 256, each octave up and down increases or decreases by a power of two. The perfect series. I just want to know what to call it, how to express it in symbolic language, and where I need to go to learn more.

    I learned in discreet math that counting and measuring are indeed two different things.
    I simply speculates that the reason we can't proof the hypothesis is because we mix counting and measuring without regard for unit of measure. I sure as heck can't proof it... I'm not alone in THAT!!!
    I'm also not the first person to beat his head repeatedly on papers that begin "If the rieman hypothesis is true..."
    It's everywhere, in every area of science. and it ticks me off that something I don't know is causing it. I have a burning desire to figure it out.

    I will not make that mistake again sir. Again, I am so sorry I even mentioned it. Again... back to the operator MFB and Tashi mention so that I can continue my work on compiling pattern recognition(big darn polynomial) instead of training it.
    No code, I just want to learn how to build the polynomial/matrix without training. Pure math I hope?
    It can't be that hard right?
    What is it and what do I need to learn to understand?
    Last edited: Sep 7, 2012
  15. Sep 7, 2012 #14
    I appears I'll have to go back to school to get the education and repetition I need as well as the training on technical writing. Unless you can get me an ordered list of the next few books i need to read... should keep me out of your hair for another couple of years. sigh.

    Anybody know of any scholarships for old guys that have been driven crazy? ;-)
    Thanks again for your assistance...i'm a lot further than I was last week with your help.
  16. Sep 7, 2012 #15
    Wouldn't the same be true of decimal left to right?
    Only instead of halves(1/2) you have tenths(1/10) of the set.
    so with a 2 digit number, such as 27, you take
    divide into 10 groups
    0-9,10-19,20-29,30-39,...80-89,90-99, take the (2+1)th(add 1 because we don't say 0th set for 0-9)
    20-29, divide into 10 groups
    20,21,22,24,...,28,29 and take the (7+1)th
    and voila 27!

    In fact, you could generalize it to any base relatively easily.

    If we have a number is base b, whose length is n.
    Define a set A, that has each digit as an element.
    A = {a1, a2, a3,...,an-1,an}
    Define another set B to have all integers less than b^n
    B ={0, 1, 2,...,(b^n)-1, b^n}
    You then divide B into b subsets of equal length and take the (a1+1)th one as your set, continue until |B| = 1

    That should work for any number in any base?
  17. Sep 7, 2012 #16


    Staff: Mentor

    The series that mfb and I wrote are power series, which generally look like this:
    $$ \sum_{n = 0}^{\infty} a_nx^n~=~a_0 + a_1x + a_2x^2 + ... + a_nx^n + ...$$

    The examples that mfb and I wrote were finite series, where the base was 1/2 (for binary fractions) or 1/10 (for decimal fractions).

    The harmonic series, which is one of many kinds of series, looks like this:
    $$ \sum_{n = 1}^{\infty} \frac{1}{n} = 1 + 1/2 + 1/3 + ... + 1/n + ...$$

    Series are usually studied in engineering-level calculus (as oppose to "calculus for poets") in the 2nd semester or 3rd quarter. There are lots of calculus books out there, all available on amazon. Some that come to mind are the ones by Thomas/Finney (maybe just Thomas is writing now), Larson, Anton, Stewart, and a bunch of others.
  18. Sep 10, 2012 #17
    THANKS a million, litterally. I KNEW once we got past my ... excitement at having been understood... and my mouth overflowing.... that I'd score!!!
    The two series are exactly what I need to learn.
    Advanced Calculus and Series. On It!

    Mark44, I'll have to read Thomas for technical writing? and another for engineering calculus? Is that right? Thanks. Any particular favorite? I prefer the writers be "long winded".

    Zula, Yes, it appears so. for any base... I'm just particularly in love with it expressed in binary.How can I figure out how to take the next step and .... name "what ever it is" so that I can research it? I need the ability to then, express the "principle" in both propositional and symbolic form to allow for the use of multiple "fixed points." (without forgetting that it describes a location in a subspace).
    Does anyone have an idea of where I would start on that line?

    This axis I defined that all have noted and identifed, seems to run up and down the scalar's digits with the two different traversal methods and appears to be some function of... scale? I am wondering what area of study will allow me to express these concepts sybolically?
    Last edited: Sep 10, 2012
  19. Sep 10, 2012 #18
    If I could have just one more book gentlemen, it would be something that describes....
    a three tiered architecture or way of looking at a math system such that the math simulation is in layer 2, operators and operator are in layer 1, and meta-operators would be in Layer 0?
    Last edited: Sep 10, 2012
  20. Sep 10, 2012 #19


    Staff: Mentor

    No, Thomas writes calculus books.
  21. Sep 10, 2012 #20


    Staff: Mentor

    I'm not aware of any such book.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook