In a typical assembly language, the integer divide instruction will also give you the remainder. In the case of remainder when dividing by 2, it's a lot easier to translate to a bit-wise AND
with bit 0 though. E.g., on x86:
mov eax, number
; test sets the flags based on a bitwise and, but discards the result
test eax, 1
mov esi, offset even_string
jz print_it
mov esi, offset odd_string
print_it:
; print string whose base address is in esi
If you need to check for divisibility by some arbitrary number (instead of just 2), the division instruction will usually produce both the quotient and the remainder. Again, using x86 as a demonstration:
idiv ebx ; divisor in edx:eax
; quotient in eax, remainder in edx