I assume, the decimal number arrives as text through some text-based communication protocol? I think, you'll benefit from changing the protocol to send either hexadecimal text or some binary representation. Exchanging decimal text makes you multiply/divide by 10 whether you like it or not.
Multiplying by 10 is not slow! Even if you don't have a multiply instruction it's just 2-3 instructions on Arm or RISC-V (and probably faster than a multiply instruction anyway).
Arm:
add r0, r0, r0, lsl #2
lsl r0, r0, #1
RISC-V, base ISA (or two instructions with Zba extension using sh2add e.g. on RP2350):
slli t0, a0, 2
add a0, a0, t0
slli a0, a0, 1
Heck it's not even hard on a 6502:
lda N
asl
asl
clc
adc N
asl
sta N
Of course it's longer for a 16 or 24 bit integer. e.g. 24 bit
lda N+2
sta T+2
lda N+1
sta T+1
lda N
sta T
asl
rol N+1
rol N+2
asl
rol N+1
rol N+2
clc
adc T
sta N
lda N+1
adc T+1
sta N+1
lda N+2
adc T+2
sta N+2
asl N
rol N+1
rol N+2
I make that as 83 cycles on 6502 ...
Read a char from a serial port and add it to N ...
again:
lda uart
beq again
clc
sbc #'0'
adc N
sta N
bcc done
inc N+1
bne done
inc N+2
done:
I get 30 cycles worst case for that. So 113 cycles per character. Over 9000 characters per second at 1.023MHz. It's 50% faster than needed to keep up with 57600 8N1, converting decimal strings of numbers between 0 and 16,777,215 to binary.
I give the extended 6502 example not because you're using a 6502, but because you're almost certainly using something better than a 6502. AVR or PIC or 8051 are all going to be similar but better.
On Arm or RISC-V converting a decimal string to binary is reading the next input character from the UART, plus 3-4 clock cycles.