2016-08-16 12:00:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
|
|
|
[
|
|
|
|
'144',
|
2017-01-23 05:49:10 +00:00
|
|
|
'1100100',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'262',
|
2017-01-23 05:49:10 +00:00
|
|
|
'10110010',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Too large
|
|
|
|
[
|
|
|
|
'#NUM!',
|
2017-01-23 05:49:10 +00:00
|
|
|
'111001010101',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Leading places
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'011',
|
2016-08-16 12:00:19 +00:00
|
|
|
'1001',
|
|
|
|
3,
|
|
|
|
],
|
|
|
|
// Leading places as a float
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'0011',
|
2016-08-16 12:00:19 +00:00
|
|
|
'1001',
|
|
|
|
4.75,
|
|
|
|
],
|
|
|
|
// Leading places negative
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#NUM!',
|
2016-08-16 12:00:19 +00:00
|
|
|
'1001',
|
|
|
|
-1,
|
|
|
|
],
|
|
|
|
// Leading places non-numeric
|
|
|
|
[
|
2017-01-23 05:49:10 +00:00
|
|
|
'#VALUE!',
|
2016-08-16 12:00:19 +00:00
|
|
|
'1001',
|
|
|
|
'ABC',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'2',
|
2017-01-23 05:49:10 +00:00
|
|
|
'00000010',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'5',
|
2017-01-23 05:49:10 +00:00
|
|
|
'00000101',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'15',
|
2017-01-23 05:49:10 +00:00
|
|
|
'00001101',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'0',
|
|
|
|
'0',
|
|
|
|
],
|
|
|
|
// Invalid binary number
|
|
|
|
[
|
|
|
|
'#NUM!',
|
2017-01-23 05:49:10 +00:00
|
|
|
'21',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// Non string
|
|
|
|
[
|
|
|
|
'#VALUE!',
|
2017-01-23 05:49:10 +00:00
|
|
|
true,
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// 2's Complement
|
|
|
|
[
|
|
|
|
'7777777625',
|
2017-01-23 05:49:10 +00:00
|
|
|
'1110010101',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
// 2's Complement
|
|
|
|
[
|
|
|
|
'7777777777',
|
2017-01-23 05:49:10 +00:00
|
|
|
'1111111111',
|
2016-08-16 12:00:19 +00:00
|
|
|
],
|
|
|
|
];
|