From 6f590b8f6ed918a5fe3f041a52db28ed0760797a Mon Sep 17 00:00:00 2001 From: Hamza elkhatri <40549481+Hamzaelkhatri@users.noreply.github.com> Date: Tue, 21 Jun 2022 11:13:50 +0100 Subject: [PATCH] Update README.md --- subjects/binaryaddition/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subjects/binaryaddition/README.md b/subjects/binaryaddition/README.md index 7cf8516b..22efa0b6 100644 --- a/subjects/binaryaddition/README.md +++ b/subjects/binaryaddition/README.md @@ -3,8 +3,8 @@ ### Instructions Write a function named `BinaryAddition(int,int)` that takes two integers and returns the sum of the two in binary in an array of `int`. -- If the sum is negative return `nil` value. -- convert the argument to binary then add the two binary numbers together +- If one of the integers is negative return `nil` +- Convert the argument to binary then add the two binary numbers together ### Expected function ```go @@ -29,7 +29,7 @@ func main(){ fmt.Println(BinaryAddition(1, 3)) fmt.Println(BinaryAddition(2, 1)) fmt.Println(BinaryAddition(2, 2)) - fmt.Println(BinaryAddition(2, 3)) + fmt.Println(BinaryAddition(1, 16)) } ``` @@ -43,4 +43,5 @@ $ go run . [0 1 1] [1 0 0] [1 0 1] +[1 0 0 0 0] ```