Add scripts
This commit is contained in:
		
							parent
							
								
									422934aef7
								
							
						
					
					
						commit
						350807c951
					
				
					 30 changed files with 574 additions and 0 deletions
				
			
		
							
								
								
									
										15
									
								
								Scripts/ConvertFrom-Bit.psm1
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Scripts/ConvertFrom-Bit.psm1
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| function ConvertFrom-Bit { | ||||
|     param ( | ||||
|         $bit | ||||
|     ) | ||||
|     [int]$int = 0 | ||||
|     $bits = $bit.ToString().ToCharArray() | ||||
|     $index = ($bits.Count)-1 | ||||
|     foreach ($b in $bits) { | ||||
|         if ($b -notlike 0) { | ||||
|             $int += [math]::Pow(2,$index) | ||||
|         } | ||||
|     $index -= 1 | ||||
|     } | ||||
|     $int | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue