<head>
<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
<style>
.c0 {color:blueviolet;}
.c1 {//color:red;}
.c0, .c1 { position:relative; font-family:monospace;}
.bits {color:brown; position:absolute; left:100pt;}
</style>
</head>
<body>
<button id="b">ещё</button> (<span id="num">0</span>)
<div id="r"></div>
<script>
var r0 = 285017901, clr = true, cnt = num = 0;
function random() {
//console.log('r0:', r0.toString(2).padStart(32, '0'));
var left = ((parseInt('01111111110000000000000000000000', 2) & r0) >>> 23);
var r1 = (r0 << 10 >>> 1) | left;
//console.log('r1:', r1.toString(2).padStart(32, '0'));
var right = ((parseInt('111111111', 2)) & r0) << 24 >>> 1;
var r2 = (r0 >>> 9) | right;
//console.log('r2:', r2.toString(2).padStart(32, '0'));
r0 = r1 + r2;
$('#r').prepend($('<div>'+r0+' <span class="bits">'+ (r0.toString(2).padStart(32, '0')) +'</span>'+'</div>').addClass('c'+Number(clr)));
//console.log('r0:', r0.toString(2));
if(++cnt >= 5) {
clr = !clr;
cnt = 0;
}
$('#num').text(++num);
}
$('#b').on('click', random);
</script>
</body>