Sponsored Content
Full Discussion: XOR two strings
Top Forums UNIX for Dummies Questions & Answers XOR two strings Post 302607286 by anil_uvce on Wednesday 14th of March 2012 05:16:23 AM
Old 03-14-2012
can u suggest me how to do that or is there any other option
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to concatenate two strings or several strings into one string in B-shell?

like connect "summer" and "winter" to "summerwinter"? Can anybody help me? thanks a lot. (2 Replies)
Discussion started by: fontana
2 Replies

2. Programming

resetting counter using bitwise XOR

Hi ! How to reset a variable to 0 after a reset value, say 10 using bitwise XOR. For example, int cnt=0; if(cnt<10) cnt++; else cnt = 0; How can we achieve this by using XOR only. thanks, (1 Reply)
Discussion started by: mrgubbala
1 Replies

3. Shell Programming and Scripting

xor 2 values in ksh?

i have to xor two variables in ksh. how to do that? tia, DN2 (5 Replies)
Discussion started by: DukeNuke2
5 Replies

4. Programming

A trivial XOR doubt in a program

Hi, I am trying to reverse a string using the following program utilizing the Exclusive OR bit operation: int main() { char str = "Quraish"; char *p = str, temp; char *q = str + strlen(str) - 1; while ( p != q ) { if (*p != *q) { *p ^= *q; *q ^= *p; *p ^= *q;... (1 Reply)
Discussion started by: royalibrahim
1 Replies

5. UNIX for Dummies Questions & Answers

Delete strings in file1 based on the list of strings in file2

Hello guys, should be a very easy questn for you: I need to delete strings in file1 based on the list of strings in file2. like file2: word1_word2_ word3_word5_ word3_word4_ word6_word7_ file1: word1_word2_otherwords..,word3_word5_others... (7 Replies)
Discussion started by: roussine
7 Replies

6. Shell Programming and Scripting

Delete lines in file containing duplicate strings, keeping longer strings

The question is not as simple as the title... I have a file, it looks like this <string name="string1">RZ-LED</string> <string name="string2">2.0</string> <string name="string2">Version 2.0</string> <string name="string3">BP</string> I would like to check for duplicate entries of... (11 Replies)
Discussion started by: raidzero
11 Replies

7. UNIX for Dummies Questions & Answers

XOR between strings

I am aware of truth table for XOR between binary values . Out of curious in would like to know how XOR works between 2 strings which contain alphabets . For example A ^ B How it works internally? Please help me to understand this Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies

8. FAQ Submission Queue

Analysis in bitwise XOR

The purpose of this article is revealing the unrevealed parts of the bitwise XOR. As we aware, the truth table for the XOR operator is : A B A^B 0 0 0 0 1 1 1 0 1 1 1 0 For example , 1^2 will be calculated as given below: First the operands... (1 Reply)
Discussion started by: pandeesh
1 Replies

9. UNIX for Beginners Questions & Answers

How to pass strings from a list of strings from another file and create multiple files?

Hello Everyone , Iam a newbie to shell programming and iam reaching out if anyone can help in this :- I have two files 1) Insert.txt 2) partition_list.txt insert.txt looks like this :- insert into emp1 partition (partition_name) (a1, b2, c4, s6, d8) select a1, b2, c4, (2 Replies)
Discussion started by: nubie2linux
2 Replies
XScreenSaver(1) 					      General Commands Manual						   XScreenSaver(1)

NAME
munch - munching squares screen hack SYNOPSIS
munch [-display host:display.screen] [-foreground color] [-background color] [-window] [-root] [-mono] [-install] [-visual visual] [-delay seconds] [-xor] [-noxor] [-shift] [-noshift] [-logminwidth minimum width] DESCRIPTION
The munch program preforms the munching squares hack until killed. It picks square size, position, and gravity randomly; configurable options are listed below. The munching squares hack cosists of drawing Y = X XOR T for a range of X and T over and over until all the possible combinations of X and T have come up. It was reportedly discovered by Jackson Wright in 1962 and took 5 instructions of PDP-6 code. OPTIONS
munch accepts the following options: -window Draw on a newly-created window. This is the default. -root Draw on the root window. -mono If on a color display, pretend we're on a monochrome display. -install Install a private colormap for the window. -visual visual Specify which visual to use. Legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual. -delay seconds How long to wait before starting over. Default 5 seconds. -xor Use the XOR drawing function. (Default.) -no-xor Don't use the XOR drawing function. -shift Start drawing the square at weird starting points. (Default.) -no-shift Don't shift and start drawing the square at weird starting points. -logminwidth minimum-width The logarithm (base 2) of the minimum with of a square (must be a power of 2, or some parts of the square aren't.) ENVIRONMENT
DISPLAY to get the default host and display number. XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property. SEE ALSO
X(1), xscreensaver(1), http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html, http://www.comedia.com/Hot/jargon_3.0/JARGON_M/MUNCHSQR.HTML HISTORY
Quoted from HAKMEM, for historical interest. As that document says, "Unless otherwise stated, all computer programs are in PDP-6/10 assem- bly language." ITEM 146: MUNCHING SQUARES Another simple display program. It is thought that this was discovered by Jackson Wright on the RLE PDP-1 circa 1962. DATAI 2 ADDB 1,2 ROTC 2,-22 XOR 1,2 JRST .-4 2=X, 3=Y. Try things like 1001002 in data switches. This also does interesting things with operations other than XOR, and rotations other than -22. (Try IOR; AND; TSC; FADR; FDV(!); ROT -14, -9, -20, ...) ITEM 147 (Schroeppel): Munching squares is just views of the graph Y = X XOR T for consecutive values of T = time. ITEM 148 (Cohen, Beeler): A modification to munching squares which reveals them in frozen states through opening and closing curtains: insert FADR 2,1 before the XOR. Try data switches = 4000,,4 1000,,2002 2000,,4 0,,1002 (Notation: <left half>,,<right half>) Also try the FADR after the XOR, switches = 1001,,1. COPYRIGHT
Copyright (C) 1997 by Tim Showalter. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHOR
Tim Showalter <tjs@andrew.cmu.edu>, 17-Jun-97, based on what's in the Jargon File and stealing stuff from existing xscreensaver modules. X Version 11 17-Jun-97 XScreenSaver(1)
All times are GMT -4. The time now is 03:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy