# What are the rightmost four digits of the binary equivalent of the decimal number 4739685

What are the rightmost four digits of the binary equivalent of the decimal number 4739685

My approach-

I converted the whole number into its binary equivalent and then checked out the last 4 digits, is there any shorter way to find it directly, I was thinking as in the case of finding last 4 digits in base 10 we do mod 10^4, so is there anything like 2^4 that we can do to find the last 4 digits in this case ? like 4739685 mod 16 ?

• The units place is obvious, right? And you don't need the whole number the figure that out, just the last digit. Similarly...
– lulu
Nov 14, 2021 at 13:13
• How do you convert decimal to binary? One of the ways is to first continuously divide by $2$ and record the remainders. e.g., from 29, you have $29 \div 2 = 14 R 1$, $14 \div 2 = 7 R 0$, $7 \div 2 = 3 R 1$, $3 \div 2 = 1 R 1$, $1 \div 2 = 0 R 1$. The remainders are $(1, 0, 1, 1, 1)$. Reverse the sequence to get $(1, 1, 1, 0, 1)$. Then the binary representation is $11101$. With this method, notice that we are obtaining the last digit, then the 2nd last digit, then the 3rd last digit, etc. So, to answer this question, simply do four steps to get the last 4 digits (and remember to reverse it). Nov 14, 2021 at 13:55
• @VTand I think you should post your comment as an answer. Nov 14, 2021 at 14:20
• See my comment on albert's answer for a simple general way. Nov 14, 2021 at 19:22

$$10^4 \pmod{16} ≡ 2^4×5^4 \pmod{2^4} ≡ 0$$
$$4739685 \pmod{16} ≡ 9685-10000 \pmod{16} ≡ -315+320 \pmod{16} ≡ 5$$
• Easier: \ \bmod 16\!:\ \begin{align}\color{#c00}{96\equiv 00}\\ \color{#0a0}{85\equiv 05}\end{align}\Rightarrow\, \color{#c00}{96}\color{#0a0}{85}\equiv \color{#c00}{00}\color{#0a0}{05},\, cf, universal divisibility test $\ \$ Nov 14, 2021 at 19:22