1
$\begingroup$

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 ?

$\endgroup$
4
  • 4
    $\begingroup$ The units place is obvious, right? And you don't need the whole number the figure that out, just the last digit. Similarly... $\endgroup$
    – lulu
    Nov 14, 2021 at 13:13
  • 1
    $\begingroup$ 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). $\endgroup$
    – VTand
    Nov 14, 2021 at 13:55
  • $\begingroup$ @VTand I think you should post your comment as an answer. $\endgroup$ Nov 14, 2021 at 14:20
  • $\begingroup$ See my comment on albert's answer for a simple general way. $\endgroup$ Nov 14, 2021 at 19:22

1 Answer 1

2
$\begingroup$

Last 4 digits of binary = Last hex-digit of hexadecimal

$10^4 \pmod{16} ≡ 2^4×5^4 \pmod{2^4} ≡ 0$

$4739685 \pmod{16} ≡ 9685-10000 \pmod{16} ≡ -315+320 \pmod{16} ≡ 5$

hex-digit of 5 = binary of 0101

$\endgroup$
2
  • $\begingroup$ 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 $\ \ $ $\endgroup$ Nov 14, 2021 at 19:22
  • $\begingroup$ Another way is to reduce tens, mod 8: 968 ≡ 160 ≡ 0 --> no tens. $\endgroup$ Nov 16, 2021 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.