Preview:
// converting binary to decimal
        int[] n = new int[]{1, 0, 0, 0, 0};
        int num = 0;
        for (int i = 0; i < n.length; i++)
        {
            num = (num<<1) | n[i];
        }
        System.out.println(num);
    
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter