Someone teach me binary :)

Cerebus451

Golden Member
Nov 30, 2000
1,425
0
76
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
There are 10 types of people when it comes to binary



grooooooooooaaaaaan

:p

EDIT: Damn, beaten by a minute!
 

Ilmater

Diamond Member
Jun 13, 2002
7,516
1
0
Originally posted by: Cerebus451
There are 10 kinds of people in the world. Those that understand binary, and those that don't.
I knew it would be a mad dash to use this line. Nice.
 

tweakmm

Lifer
May 28, 2001
18,436
4
0
01001000011001010110110001101100001000000110111001101111001000000110001001101001011101
00011000110110100000101100001000000110011101100101011101000010000001100010011001010110
11100111010000100000011000010111000001101000011001010111100000101110

;) :p
 

DivideBYZero

Lifer
May 18, 2001
24,117
2
0
010101110110100001111001001000000110010001101111011011100010011101110100001000000111100101101111011101010010000001110100011110010111000001100101001000000100001001101001011011100110000101110010011110010010000001110100011101010111010001101111011100100110100101100001011011000010000001101001011011100010000001100111011011110110111101100111011011000110010100111111
 

Argo

Lifer
Apr 8, 2000
10,045
0
0
Originally posted by: tweakmm
01001000011001010110110001101100001000000110111001101111001000000110001001101001011101
00011000110110100000101100001000000110011101100101011101000010000001100010011001010110
11100111010000100000011000010111000001101000011001010111100000101110

;) :p

I'd appreciate it if you left my mother out of this.
 

nakedfrog

No Lifer
Apr 3, 2001
63,061
19,372
136
Sure, no problem. First, you find out where your local library is, and then you get a library card. Then check out a book on binary.
 

DougK62

Diamond Member
Mar 28, 2001
8,035
6
81
It takes two minutes to read about binary on one of the many webpages out there. If you don't understand from one of them then just give up.

It's incredibly easy.
 

RaDragon

Diamond Member
May 23, 2000
4,123
1
71
01010111 01101000 01111001 00100000 01100100 01101111 00100000 01111001 01101111 01110101 00100000 01110111 01100001 01101110 01110100 00100000 01110100 01101111 00100000 01101100 01100101 01100001 01110010 01101110 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00111111

 

RaDragon

Diamond Member
May 23, 2000
4,123
1
71
<?php

/***********************************************************************
* binary.php - v 1.23 - 2002/05/07
*
* Snarkles.net Text-to-Binary Converter
* =====================================
* Send and decode messages in binary!
*
* This was my first script, so please be kind. :) Also, please forward
* any suggestions, problems, improvements, etc. to the e-mail address
* below. Thanks! :D
*
* Copyright (c) 2000, 2001 snarkles (webgeek@snarkles.net)
* Distributed under the GNU/GPL license (see http://www.gnu.org/copyleft/)
************************************************************************/
/************************************************************************
* Changelog
* =========
* v 1.23 - 2002/05/07:
* - Got rid of striptags() and added htmlspecialchars() so that you can
* convert HTML/PHP to binary too! PLEASE notify of any bugs this causes!
* - Moved all the text processing into the txt2bin/bin2txt functions
*
* v 1.22 - 2002/02/17:
* - Cleaned up code, comments, HTML, etc.
*
* v 1.21 - 2001/10/14:
* - Removed the "str_pad" function from the "txt2bin" portion for backwards
* compatibility with PHP3. Thanks, cyber junkie for the heads up!
* - Added changelog and versioning system, since this probably isn't the
* first bug I'll have to squash. ;)
*
* v 1.2 - 2001/10/09:
* - Added quick fix for Opera compatibility under txt2bin. Thanks for
* pointing out the problem, tommyj!
* - Released the script *gulp!* :)
*************************************************************************/
$version = "1.23";

// You can alter the HTML below to make this script fit more inline with
// the rest of your site.

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title> Snarkles.Net Text-to-Binary (and back!) Converter </title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
<!--
body { font-family: "arial", "helvetica", sans-serif; font-size: 10pt; }
-->
</style>
</head>
<body>

<?php

// Declare functions

function txt2bin($str) {
$text_array = explode("\r\n", chunk_split($str, 1));
for ($n = 0; $n < count($text_array) - 1; $n++) {
$newstring .= substr("0000".base_convert(ord($text_array[$n]), 10, 2), -8);
}
$newstring = chunk_split($newstring, 8, " ");
return $newstring;
}

function bin2txt($str) {
$str = str_replace("\r\n", "", str_replace(" ", "", $str));
$text_array = explode("\r\n", chunk_split($str, 8));
for ($n = 0; $n < count($text_array) - 1; $n++) {
$newstring .= chr(base_convert($text_array[$n], 2, 10));
}
$newstring = htmlspecialchars($newstring);
return $newstring;
}

// Check to see if form was submitted yet

if (isset($submit)) {

// Yes, so make sure they filled something in

if($text == '') {
die("<p>Fill in the form, dinglefritz! ;)</p>\n");
}

// Looks good, so clean up data

$text = urldecode(stripslashes($text));

// Make copy of original text for later display

$orig_text = htmlspecialchars($text);

// Time to process the form

if ($convert == "txt2bin") {

// Convert from text to binary

$text = txt2bin($text);

} elseif ($convert == "bin2txt") {

// Convert from binary to text

$text = bin2txt($text);

} else {

// This shouldn't happen

die("<p>Hmmm. Now THAT'S no good. How about go back and try again?</p>\n");

}

// Display result

echo("<p>$orig_text converts to:</p>\n");
echo("<p>$text</p>\n");

} else {

// Form has not been submitted, so display greeting

?>

<center>
<p>Welcome to the Snarkles.Net Text to Binary (and back!) Converter!</p>
</center>

<?php

} // End big if

?>

<!-- begin form -->

<center>
<p>Please insert text below:</p>

<form method="post" action="<?php echo($PHP_SELF); ?>">
<textarea name="text" rows="10" cols="45"></textarea><br />
<input type="radio" name="convert" value="txt2bin" checked="checked" /> Convert from text to binary<br />
<input type="radio" name="convert" value="bin2txt" /> Convert from binary to text<br />
<input type="submit" name="submit" value="Convert!" />
<input type="reset" value="Clear" />
</form>
</center>

<!-- begin footer; it would be nice if you would leave this on. ;) -->

<center>
<p>
<font size="1">Fine Print Shtuff:<br />
Snarkles.net Text-to-Binary Converter - Version <?php echo($version); ?><br />
&amp;copy; 2000, 2001 <a href="http://snarkles.net">snarkles</a><br />
Download a copy <a href="binary-<?php
echo($version); ?>.zip">here</a></font>
</p>
</center>

</body>
</html>
 

Train

Lifer
Jun 22, 2000
13,590
86
91
www.bing.com
Blech, binary is next to useless these days.

learn Hexadecimal, now that can come in handy.


A + 9 = 13
E - 4 = 9
F + E = 1D
 

RaDragon

Diamond Member
May 23, 2000
4,123
1
71
01010101 01110011 01100101 00100000 01110100 01101000 01100101 00100000 01100011 01101111 01100100 01100101 00100000 01100001 01100010 01101111 01110110 01100101 00100000 01100001 01101110 01100100 00100000 01100111 01101111 00100000 01110100 01101111 00100000 00111100 01100001 00100000 01101000 01110010 01100101 01100110 00111101 00100010 01101000 01110100 01110100 01110000 00111010 00101111 00101111 01110111 01110111 01110111 00101110 01110011 01101110 01100001 01110010 01101011 01101100 01100101 01110011 00101110 01101110 01100101 01110100 00100010 00111110 01010011 01101110 01100001 01110010 01101011 01100101 01101100 01110011 00101110 01101110 01100101 01110100 00111100 00101111 01100001 00111110
 

Pepsi90919

Lifer
Oct 9, 1999
25,162
1
81
Originally posted by: Train
Blech, binary is next to useless these days.

learn Hexadecimal, now that can come in handy.

you should know binary before you know hex though