Binary converter

  • xetalim
    7th Jun 2013 Member 0 Permalink

    not showing it @greymatter

    i want a bin->dec converter

    not dec->bin

  • greymatter
    7th Jun 2013 Member 0 Permalink
    @xetalim (View Post)
    Reverse the place where you give inputs?
  • xetalim
    7th Jun 2013 Member 0 Permalink

    @greymatter (View Post)

     wont work i fear?

  • New-IdeasForYou
    8th Jun 2013 Member 0 Permalink

    man... i dont even know if there isnt enough space in tpt screen for that. Firstly you need some thing to sum decimal numbers. If you can make a calculator, you are one step behind making a binary converter. 

    But its a good idea. 

  • greymatter
    8th Jun 2013 Member 0 Permalink
    @xetalim (View Post)
    Perhaps some calculator save will have one..but it's difficult to find out which is the converter's parts and which is not.
  • jalfor
    8th Jun 2013 Member 0 Permalink

    EDIT: I only read the first page

  • Synergy
    29th Jul 2013 Member 0 Permalink

    Bumping, but go to google and search 'double dabble alogorithm'. That should help you. Also search around for the lookup table grids (I think originally created by massey is I remember correctly). A lot of people use them for converting binary to single signals, or the other way around. Also search for Crionis' ARRAY lookup device. It performs the same function as massey's grid, just in a smaller compact form.

     

    Generally speaking, if you are converting 5 bits of binary (or less), then you can just create a lookup table for each individual outcome. (5 bits only has 31 different outcomes). Anything larger (8 bits for example) would require a more advanced algorithm, which is where double dabble comes in. It converts the binary to a string of seperate 4 bit numbers. For example, it would convert the number 11111111 (255) into 0010 0101 0101 (2 5 5). You can then send those groups of bits into seperate lookup grids and convert them to decimal (by decimal I mean 7-segment display data).

     

    You will need to learn the alogirthm from google, and then come up with its implementation yourself. I have only ever seen me and 2 other people do it. Just visualize the algorithm and you're good to go.

  • mniip
    29th Jul 2013 Developer 0 Permalink
    @Synergy (View Post)
    double dabble is ass-hard to implement with TPT electronics
  • Synergy
    30th Jul 2013 Member 0 Permalink

    I might make a new double dabble converter soon after I finish making the processor I am working on. It's not THAAAT hard (although yeah it's probably one of the hardest things to do in TPT. Worth it though).