Sponsored Content
Full Discussion: bitwise and if
Top Forums Programming bitwise and if Post 302190007 by shamrock on Monday 28th of April 2008 11:35:49 AM
Old 04-28-2008
Quote:
Originally Posted by Puntino
I tried on my own and I can say that
given that code lines, the line 10 will never be active because the condition in in the if at line 5 can't be true since REFRESING is 0100 (low foru bits) while IN_USE 0001
it could be true if REFRESING = 01001.
So I can't say that EXITING and REFRESHING are two particular cases of IN_USE but they are different cases.
Are you agree with me?
Yes it would be correct to say that the REFRESHING / EXITING cases are the different states a process slot can be in though they are not particular cases of the IN_USE state as proven by the bitwise ANDing of the various process slot states.
 

10 More Discussions You Might Find Interesting

1. Programming

Bit-fields and Bitwise operators

Hi, Is it possible to use bitwise operators in bit fields? For example: typedef struct Mystruct { unsigned char A :1 ; unsigned char B :1 ; } Mystruct; and assume struct Mystruct STR_1S, STR_2S, tempSTRS = {0}; then the following line: tempSTRS = STR_1S & STR_2S; gives the... (3 Replies)
Discussion started by: amatsaka
3 Replies

2. UNIX for Advanced & Expert Users

bitwise operators

can anybody write a program to divide a number by another number using bitwise operators (9 Replies)
Discussion started by: areef4u
9 Replies

3. 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

4. Shell Programming and Scripting

Bitwise negation

I am taking an online course on Unix scripting. The topic is Unix arithmetic operators and the lesson is Logical and bitwise operations. It is not clear how much storage space Unix uses to represent integers that are typed. Bitwise negation caused me to question how many bits are used to... (3 Replies)
Discussion started by: dLloydm
3 Replies

5. Shell Programming and Scripting

how to calculate netwrk from IP address and netmask using Bitwise AND in shell script

Hi, I am having two variables IP="10.150.12.1" netmask="255.255.255.0" To get network number, I know that a bitwise & will help. networkno=IP & netmask My code is #!/usr/bin/ksh ip="10.150.12.1" netmask="255.255.255.0" networkno="$ip" & "$netmask" echo $networkno I am... (7 Replies)
Discussion started by: chaitanyapn
7 Replies

6. Emergency UNIX and Linux Support

bitwise and between two 32 bit binaries

Hello All, i have two 16 bit binaries that in two different variables, i want to perform a bitwise AND between the two and store the result in a different variable. can anyone throw some light on doing this in a bourne shell... eg var1= 1110101010101011 ... (8 Replies)
Discussion started by: venu
8 Replies

7. 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

8. Shell Programming and Scripting

how to use bitwise or operator in /bin/sh

please any one can suggest me how to use bitesie || opearator to do this #initallize a=0 b=0 #condition if then a=0 else a=1 fi #bitwise or opeartion b = a || b Please view this code tag video for how to use code tags when posting code and data. (3 Replies)
Discussion started by: Palaniappan
3 Replies

9. Shell Programming and Scripting

Bitwise comparison of cols

Hello, I want to compute the bitwise number of matches in pairwise fashion for all columns. The problem is I have 18486955 rows and 750 columns. Please help with code, I believe this will take a lot of time, is there a way of tracking progress? Input Org1 Org2 Org3 A A T A ... (9 Replies)
Discussion started by: ritakadm
9 Replies

10. Programming

Bitwise operation for state machine

Hello All, I am writing basic state machine which maintains 8 different states and there is posibility that system may be in multiple states at a time (Except for state1 to state3. menas only once state can be active at a time from state1 to state3). I have declared... (9 Replies)
Discussion started by: anand.shah
9 Replies
FFSINFO(8)						    BSD System Manager's Manual 						FFSINFO(8)

NAME
ffsinfo -- dump all meta information of an existing ufs file system SYNOPSIS
ffsinfo [-g cylinder_group] [-i inode] [-l level] [-o outfile] special | file DESCRIPTION
The ffsinfo utility extends the dumpfs(8) utility. The output is appended to the file outfile. Also expect the output file to be rather large. Up to 2 percent of the size of the specified file system is not uncommon. The following options are available: -g cylinder_group This restricts the dump to information about this cylinder group only. Here 0 means the first cylinder group and -1 the last one. -i inode This restricts the dump to information about this particular inode only. Here the minimum acceptable inode is 2. If this option is omitted but a cylinder group is defined then only inodes within that cylinder group are dumped. -l level The level of detail which will be dumped. This value defaults to 255 and is the ``bitwise or'' of the following table: 0x001 initial superblock 0x002 superblock copies in each cylinder group 0x004 cylinder group summary in initial cylinder group 0x008 cylinder group information 0x010 inode allocation bitmap 0x020 fragment allocation bitmap 0x040 cluster maps and summary 0x100 inode information 0x200 indirect block dump -o outfile This sets the output filename where the dump is written to, and must be specified. If - is provided, output will be sent to stdout. EXAMPLES
ffsinfo -o /var/tmp/ffsinfo -l 1023 /dev/vinum/testvol will dump /dev/vinum/testvol to /var/tmp/ffsinfo with all available information. SEE ALSO
disklabel(8), dumpfs(8), fsck(8), growfs(8), gvinum(8), newfs(8), tunefs(8) HISTORY
The ffsinfo utility first appeared in FreeBSD 4.4. AUTHORS
Christoph Herrmann <chm@FreeBSD.org> Thomas-Henning von Kamptz <tomsoft@FreeBSD.org> The GROWFS team <growfs@Tomsoft.COM> BUGS
Snapshots are handled like plain files. They should get their own level to provide for independent control of the amount of what gets dumped. It probably also makes sense to some extend to dump the snapshot as a file system. BSD
September 8, 2000 BSD
All times are GMT -4. The time now is 04:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy