You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
336 B
Raku
10 lines
336 B
Raku
#!/usr/local/bin/perl
|
|
|
|
$vector = pack ("B*", "11110011");
|
|
$val1 = vec ($vector, 0, 4);
|
|
$val2 = vec ($vector, 1, 4);
|
|
print ("high-to-low order values: $val1 and $val2\n");
|
|
$vector = pack ("b*", "11110011");
|
|
$val1 = vec ($vector, 0, 4);
|
|
$val2 = vec ($vector, 1, 4);
|
|
print ("low-to-high order values: $val1 and $val2\n"); |