Results 1 to 26 of 26

Thread: Hex???

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Posts
    257

    Hex???

    I figured this would be the best place for this Q.
    Where can I learn a bit more about Hex, mainly converting, I can convert from hex to dec, but I get sooooo lost doing it the other way round.
    When I write my code, only God and I know what it means. But a week later, only God knows.

  2. #2
    Knight_Vision
    Guest
    here.. see if my website can help you out. Look in the TUTORIALS.

    IF they are not enough for you, then let me know PLEASE!! Because I want to add more to those tuts if needed...

    Thanks.

    http://ossourcecode.tripod.com

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Posts
    257
    cool, thnx!
    I'm sure it'll help.
    one more thing, is learning ASM on your own(w/o doing @ college) something you would suggest ??
    When I write my code, only God and I know what it means. But a week later, only God knows.

  4. #4
    Knight_Vision
    Guest
    Collage would help. But i'll tell you this, everything I know, I learned on my own. It does help when you have someone explain certain things to you. But other then that, you'll pick it up. You just have to have the programming spirit within you.

    Anytime you need help, just give me a holler...

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2000
    Posts
    257
    cool!, thnx
    When I write my code, only God and I know what it means. But a week later, only God knows.

  6. #6
    ChimpFace9000
    Guest
    Hey knight, do a tut on hex coding. Ive havent found one yet, and you seem to know what your talking about. I say, go for it!

  7. #7
    Knight_Vision
    Guest
    Sure, I would love to do a tut on it. I'll get right on it.

    How do you want it? HEX to DEC or DEC to HEX or what? Give me spacifics because saying "do one on HEX codeing" is pretty vague.. LOL

    But let me know and i'll get on it.

    Oh and hey, thanks for the compliment..

  8. #8
    ChimpFace9000
    Guest
    About coding in hex. Like in my thread where you just gave me an answer. http://www.vbforums.com/showthread.p...threadid=74224 , just in the tut, go more in depth.

  9. #9
    Knight_Vision
    Guest
    Ok, will do... Give me a week though. I'm at a library and doing all of this on it. err. I only get an hour a day.. I should have it done in less then a week if I get more time.. Thanks..
    Knight

  10. #10
    Knight_Vision
    Guest
    Hey ChimpFace9000,
    I finished the HEX tut a little earlier then I planned. LOL

    goto my website and you will see ALL kinds of stuff that I typed up last night. ALSO, IF YOU DOWNLOADED TUT3 and BOOTSTRAP TUT 2, GET THEM AGAIN. The old ones had errors, that I fixed last night.

    There you go, ASK AND YE SHALL RECIEVE... LOL

  11. #11
    ChimpFace9000
    Guest
    Ok Knight, the hex reference came out great. I read your bootstrap stuff. They are ok, if you want a tip though, i suggest you make them into more of a tutorial form instead of just source code and an explanation.

  12. #12
    New Member
    Join Date
    Jan 2001
    Location
    Bruchsal, Germany
    Posts
    4
    Hi John!

    Great work on your Site! Congratulations!

    Actually i'm searching on a tutorial on Double to Hex.
    I wonder a double value of 12123.456 gives 7D 3F 35 5E BA AD C7 40 in Hex.
    How do this work

    Regards

    Andi Goering
    Andi Goering, Bruchsal - Germany

  13. #13
    Knight_Vision
    Guest
    andigoering -
    Ok, first off, 12123.456 doesn't equal the answer you came up with in HEX. The actual answer is 2F5B.1C8

    What you shown as your answer actually is this...

    7D3F355E - 2101294430

    BAADC740 - 3131950912

    Both of these above are Double Words. You had it as if the answer was 2 Double Words in one. No such thing.

    Also too. If you want to convert a decimal point over, just convert the numbers to HEX according to their side. For example: Like I did above, I converted 12123 first to HEX. Then I added the decimal and then converted the 456 to HEX and added that to the end of it. Simple and effective.

    If I am way off of what your asking, then I apologize. I was a little stumped as to what your tryng to ask.

    ChimpFace9000 -
    Explain to me how I wold go about that and i'll see what I can do. Because I don't quite understand what your after. I thought I did make it into a tutorial form by explaining what each command does. Please explain, i'm curious now...

    Knight

  14. #14
    New Member
    Join Date
    Jan 2001
    Location
    Bruchsal, Germany
    Posts
    4
    Hi John!

    It is a I'd said. Here is my code:

    Dim filename As String
    Dim doublewert As Double

    filename = ".\double.bin"
    doublewert = 12123.456

    FileNumber = FreeFile
    Open filename For Binary As #FileNumber
    Put #FileNumber, , doublewert
    Close #FileNumber

    In the file I got:
    7D3F355EBAADC740

    How does this works?

    Andi Goering
    Andi Goering, Bruchsal - Germany

  15. #15
    Knight_Vision
    Guest
    Ahhhhh.. Now I see what you did.. Give me some time to write this up.. I'll let you know.. BTW - What BASIC program are you using for this?

    Knight

  16. #16
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    The double datatype is a IEEE Standard 754 Double Precision Floating Point, the way it's stored in memory as well as processed by the cpu is explained here:
    http://research.microsoft.com/~holla...ieeefloat.html
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  17. #17
    Knight_Vision
    Guest
    Thank you kedaman!!! I knew what it was, but couldn't for the life of me figure out HOW to explain 64-Bit (16 Digit Precision) floating point number conversions. I played with the code he had posted in PowerBasic and it works perfect. But I was stumped as to how to EXPLAIN it to someone else in a tutorial.. LOL

    You saved my bacon man.. your awesome. Thanks guy...

    Knight Vision

  18. #18
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Hey that was nothing I just posted a link
    I went to your website and took a look on your asm tutorials, very nicely written, maybe there's hope for me to learn ASM after all
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  19. #19
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    0x8 = 0
    1x4 = 4
    0x2 = 0
    1x0 = 1
    ---------
    Added together make 5

    WHOA!! WAIT! WAIT!! That last one says 1x0. That's supposed to be a 0
    Hmm, I skimmed trough 90% of the first two, after all i tried to learn asm some time ago. But here i stopped. 2 to the power of 0 is 1 not 0. 1x1=1 It's nothing weird
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  20. #20
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Same thing in the fourth tut. a^0=1 always except 0^0 which i don't quite remember what it was, i think you have to apply hopitals rules on it. Well further on for the fun part I guess, the instructions that i never got used to
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  21. #21
    Knight_Vision
    Guest
    Yea, I know. It stumped me too when I first learned it. However, it was proven that 1x0=1 in computer langauge. So, I quite questioning it. In real world math, it's not right, but in computer math, it correct. Don't ask me why...

  22. #22
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    where did you read that?
    This is not computer math, computer math is more known as boolean logic and 1x0 in boolean logic is 0. In any case the radix convertions are done aritmetically.

    Take a look at this:
    0x8 = 0
    1x4 = 4
    0x2 = 0
    1x1 = 1

    it is analoguous with this:
    0x1x2x2x2 = 0
    1x1x2x2 = 4
    0x1x2 = 0
    1x1 = 1
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  23. #23
    Knight_Vision
    Guest
    I agree with you Ked... However, after all the research I have done, you have to have 1x0=1 when it comes to HEX to conversions... Otherwise it doesn't work. You will be off in your conversions.

    Like I said, don't ask me... I just know this is supposed to work this way.

    Knight Vision

  24. #24
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Can you post any links?
    I won't be convinced without reason
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  25. #25
    Knight_Vision
    Guest

    YO!! KEDAMAN!!!

    Hey Kedaman, I fixed the tutorials. I figured out where I went wrong. It seems we were both right, but looking at it differently. Now you can goto my tutorials on my site and it's straightened out. Sorry about the confusion. I also added and updated a few other things as well. LOS-BOOT.ZIP is a good one..

  26. #26
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Looks ok now I had to revert to reading the art of assembly tutorial,'tis really boring but there seems to be no other way out I'll have a look at the bootstrap stuff later, might be cool to stuff to know
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width