8086, hex to decimal program - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

8086, hex to decimal program

Hi im trying to make a program to the following specifications:

0) initialise a temporary numerical value to 00H, base value to 10H and count value to 00H
1) Read in a character
2) Apply series of checks against

Comments

  • fangxifangxi Posts: 13Member
    for decimal to hex you can just divide your number by 16 until it is 0, the remainder is the value of hex
    ex: our decimal is 32
    [code]
    32/16 = 2 R 0
    2/ 16 = 0 R 2
    0/16 = 0 R 0

    your hex is 020
    [/code]
    the general format is base * digit ^ n-1 (n is the the position ones digits= 1 , tens digit = 2...etc)

    which you can use to check your conversion


Sign In or Register to comment.