Ermite,
вариант для любого количества checkbox
<!DOCTYPE HTML>
<html>
<head>
<script>
function show_alert()
{
var www = document.querySelector('#www'),
qqq = document.querySelector('#qqq'),
check = document.querySelectorAll('[type="checkbox"]'),
result = [].reduceRight.call(check,function(num, current) {
return num + +current.checked;
}, '');
result = parseInt(result, 2);
result++;
www.value=qqq.value * result
}
</script>
</head><body>
<input id="qqq">
<input type="checkbox" >1 <input type="checkbox" >2 <input type="checkbox" >4 <input type="checkbox" >8
+=1
<input type="button" value="Go! " onclick="show_alert()">
<br>
<input id="www">
</body>
</html>