EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / if u want in asm programming

if u want in asm programming

|

Microcontroller › 8051 › Give me Hex to decimal & decimal to ascii conversion › if u want in asm programming

December 22, 2016 at 7:21 pm #14291
Ashutosh Bhatt
Participant

if u want in asm programming then its very easy

1) saparate upper and lower nibble of HEX data using masking

2) shift upper nibble to right by 4 position

3) multiply uppper nibble data by 16

4) add the result with lower nibble

here is HEX to decimal conversion is complete

5) now again saparate upper and lower nibbles

6) add 30h (or 48d) in both nibbles to get ASCII values

RSS Recent Posts

  • Understanding reversing polarity at astable multivibrator April 19, 2026
  • Integrating 0–5V ECU Signals into a Double-DIN Setup – Module vs Custom Head Unit? April 19, 2026
  • Selection Criteria and Safe Usage of Cable Ties in Electronics Applications April 19, 2026
  • Mystery amp noise - ?? April 19, 2026
  • timing delay code statements using Swordfish April 19, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise