juniour js-scripter,
или так ...
<script>
var arr = [1,0,0,0,1,1,0,1];
var key = "" + arr[0];
var obj = arr.slice(1).reduce(function(acc, el) {
key += el;
key = key.slice(-2);
acc[key] = (acc[key] || 0) + 1;
return acc;
}, {});
document.write(JSON.stringify(obj, "", 4))
</script>