Here is a small routine for adding a 16-bit number to a 32-bit number (that does not exceed maximum or minimum value):
To add GG'+B (does not exceed FFFFFFFF):
G'+B→G'
G+Ɵ'
If Ɵ' ;this means 32-bits were exceeded D:
-1→G' ;This is negative 1, not minus 1
→G
To subtract without going below zero:
G'-B→G'
G--Ɵ' ;this is minus negative Ɵ'
If Ɵ' ;this means 32-bits were exceeded D:
0→G'
→G